luaur-ast 0.1.3

Lexer, parser, and AST for Luau (faithful Rust port).
Documentation
1
2
3
4
5
6
7
8
9
use crate::records::location::Location;

impl Location {
    pub fn overlaps(&self, l: &Location) -> bool {
        (self.begin <= l.begin && self.end >= l.begin)
            || (self.begin <= l.end && self.end >= l.end)
            || (self.begin >= l.begin && self.end <= l.end)
    }
}