luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
use luaur_ast::records::ast_node::AstNode;
use luaur_ast::records::location::Location;
use luaur_ast::records::position::Position;

pub fn stat_is_before_pos(stat: &AstNode, cursor_pos: &Position) -> bool {
    let stat_location = unsafe { &*stat }.location;
    stat_location.begin < *cursor_pos
}