luaur_ast/methods/
parser_table_separator.rs1use crate::enums::separator::Separator;
2use crate::records::lexeme::Type;
3use crate::records::parser::Parser;
4
5impl Parser {
6 pub fn table_separator(&mut self) -> Separator {
7 if self.lexer.current().r#type == Type(',' as i32) {
8 Separator::Comma
9 } else if self.lexer.current().r#type == Type(';' as i32) {
10 Separator::Semicolon
11 } else {
12 Separator::Missing
13 }
14 }
15}
16
17#[allow(non_snake_case)]
18pub fn parser_table_separator(this: &mut Parser) -> Separator {
19 this.table_separator()
20}