#[macro_export] macro_rules! token { ($self:expr, $token:expr) => { crate::lexer::Token { line: $self.line, line_start: $self.line_start, column: $self.column, start: $self.start, end: $self.current, token_type: $token, } }; } #[macro_export] macro_rules! lit { ($type:ident, $data:expr, $token:expr) => { $crate::parser::AST { ast_type: $crate::parser::ASTType::Lit($crate::parser::Lit::$type($data)), start: $token.start, end: $token.end, line: $token.line, column: $token.column, } }; }