luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::records::warning_comparator::WarningComparator;
use luaur_ast::records::position::Position;

impl WarningComparator {
    #[inline]
    pub fn compare_position_position(&self, lhs: &Position, rhs: &Position) -> i32 {
        if lhs.line != rhs.line {
            return if lhs.line < rhs.line { -1 } else { 1 };
        }
        if lhs.column != rhs.column {
            return if lhs.column < rhs.column { -1 } else { 1 };
        }
        0
    }
}