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
16
use crate::records::lint_comparison_precedence::LintComparisonPrecedence;
use luaur_ast::records::ast_expr_binary::AstExprBinary_Op;

impl LintComparisonPrecedence {
    pub fn is_comparison(&self, op: AstExprBinary_Op) -> bool {
        matches!(
            op,
            AstExprBinary_Op::CompareNe
                | AstExprBinary_Op::CompareEq
                | AstExprBinary_Op::CompareLt
                | AstExprBinary_Op::CompareLe
                | AstExprBinary_Op::CompareGt
                | AstExprBinary_Op::CompareGe
        )
    }
}