luaur-ast 0.1.1

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

impl AstName {
    #[allow(clippy::non_canonical_partial_ord_impl)]
    pub fn operator_lt(&self, rhs: &AstName) -> bool {
        if !self.value.is_null() && !rhs.value.is_null() {
            unsafe { core::ffi::CStr::from_ptr(self.value) < core::ffi::CStr::from_ptr(rhs.value) }
        } else {
            self.value < rhs.value
        }
    }
}