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::ast_node::AstNode;
use crate::rtti::AstNodeClass;

impl AstNode {
    #[inline]
    pub fn is<T: AstNodeClass>(&self) -> bool {
        self.class_index == T::CLASS_INDEX
    }
}