luaur_ast/methods/
location_overlaps.rs1use crate::records::location::Location;
2
3impl Location {
4 pub fn overlaps(&self, l: &Location) -> bool {
5 (self.begin <= l.begin && self.end >= l.begin)
6 || (self.begin <= l.end && self.end >= l.end)
7 || (self.begin >= l.begin && self.end <= l.end)
8 }
9}