luaur-ast 0.1.3

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

impl Lexer {
    pub fn peek_brace_stack_top(&self) -> Option<BraceType> {
        if self.brace_stack.is_empty() {
            None
        } else {
            self.brace_stack.last().copied()
        }
    }
}