Skip to content

Commit

Permalink
🐛 Fix parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Philogy committed Oct 17, 2024
1 parent 2a97075 commit c24f69d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ast/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fn macro_statement<'tokens, 'src: 'tokens>() -> impl Parser<'tokens, 'src, ast::
let instruction = instruction().map(ast::MacroStatement::Instruction);
let invoke = invoke().map(ast::MacroStatement::Invoke);

choice((label, instruction, invoke))
choice((label, invoke, instruction))
}

fn instruction<'tokens, 'src: 'tokens>() -> impl Parser<'tokens, 'src, ast::Instruction<'src>> {
Expand Down Expand Up @@ -240,14 +240,14 @@ fn invoke<'tokens, 'src: 'tokens>() -> impl Parser<'tokens, 'src, ast::Invoke<'s
};

choice((
invoke_macro,
invoke_builtin("__tablestart", ast::Invoke::BuiltinTableStart),
invoke_builtin("__tablesize", ast::Invoke::BuiltinTableSize),
invoke_builtin("__codesize", ast::Invoke::BuiltinCodeSize),
invoke_builtin("__codeoffset", ast::Invoke::BuiltinCodeOffset),
invoke_builtin("__FUNC_SIG", ast::Invoke::BuiltinFuncSig),
invoke_builtin("__EVENT_HASH", ast::Invoke::BuiltinEventHash),
invoke_builtin("__ERROR", ast::Invoke::BuiltinError),
invoke_macro,
))
}

Expand Down

0 comments on commit c24f69d

Please sign in to comment.