luaur-ast 0.1.0

Lexer, parser, and AST for Luau (faithful Rust port).
Documentation
use crate::records::lexeme::Lexeme;
use crate::records::match_lexeme::MatchLexeme;

impl MatchLexeme {
    pub fn new(l: &Lexeme) -> Self {
        Self {
            type_: l.r#type,
            position: l.location.begin,
        }
    }

    pub fn missing() -> Self {
        Self {
            type_: crate::records::lexeme::Type::Eof,
            position: crate::records::position::Position::missing(),
        }
    }
}

#[allow(non_snake_case)]
pub fn parser_match_lexeme_match_lexeme(l: &Lexeme) -> MatchLexeme {
    MatchLexeme::new(l)
}