Skip to content

Commit

Permalink
wip: Treat semicolon terminator as a synchronizing token
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Oct 20, 2023
1 parent 146330d commit 60b4755
Show file tree
Hide file tree
Showing 14 changed files with 231 additions and 109 deletions.
3 changes: 3 additions & 0 deletions crates/codegen/parser/generator/src/parser_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ impl ParserDefinitionNodeExtensions for ParserDefinitionNode {
);

quote! {
let mut delim_guard = input.open_delim(TokenKind::#terminator);
let input = delim_guard.ctx();

SequenceHelper::run(|mut seq| {
#body_parser
seq.elem(self.parse_token_with_trivia::<{#lex_ctx}>(input, TokenKind::#terminator))?;
Expand Down
40 changes: 40 additions & 0 deletions crates/solidity/outputs/cargo/crate/src/generated/language.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions crates/solidity/outputs/npm/crate/src/generated/language.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 60b4755

Please sign in to comment.