mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Add Region::new
This commit is contained in:
parent
83de38bab1
commit
fe86c3b49d
1 changed files with 9 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue