Add Region::new

This commit is contained in:
Richard Feldman 2019-11-27 17:29:28 -05:00
parent 83de38bab1
commit fe86c3b49d

View file

@ -21,6 +21,15 @@ impl Region {
}
}
pub fn new(start_line: u32, end_line: u32, start_col: u16, end_col: u16) -> Self {
Self {
start_line,
start_col,
end_line,
end_col,
}
}
pub fn span_across(start: &Region, end: &Region) -> Self {
Region {
start_line: start.start_line,