luaur_ast/methods/
location_extend.rs1use crate::records::location::Location;
2
3impl Location {
4 pub fn extend(&mut self, other: &Location) {
5 if other.begin < self.begin {
6 self.begin = other.begin;
7 }
8 if other.end > self.end {
9 self.end = other.end;
10 }
11 }
12}