luaur_ast/methods/parser_parse_chunk.rs
1use crate::records::ast_stat_block::AstStatBlock;
2use crate::records::lexeme::Type;
3use crate::records::parser::Parser;
4
5impl Parser {
6 pub fn parse_chunk(&mut self) -> *mut AstStatBlock {
7 let result = self.parse_block();
8
9 if self.lexer.current().r#type != Type::Eof {
10 self.expect_and_consume_fail(Type::Eof, "");
11 }
12
13 result
14 }
15}