Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into error-recovery-sepa…
Browse files Browse the repository at this point in the history
…rated
  • Loading branch information
Xanewok committed Sep 20, 2023
2 parents ddfd506 + 25fcdc4 commit c122f29
Show file tree
Hide file tree
Showing 4 changed files with 3,414 additions and 4,212 deletions.
20 changes: 8 additions & 12 deletions crates/codegen/parser/generator/src/parser_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,10 @@ impl ParserDefinitionNodeExtensions for ParserDefinitionNode {
})
.collect::<Vec<_>>();
quote! {
{
SequenceHelper::run(|mut seq| {
#(#parsers)*
seq.finish()
})
}
SequenceHelper::run(|mut seq| {
#(#parsers)*
seq.finish()
})
}
}
}
Expand All @@ -95,12 +93,10 @@ impl ParserDefinitionNodeExtensions for ParserDefinitionNode {
})
.collect::<Vec<_>>();
quote! {
{
ChoiceHelper::run(input, |mut choice, input| {
#(#parsers)*
choice.finish(input)
})
}
ChoiceHelper::run(input, |mut choice, input| {
#(#parsers)*
choice.finish(input)
})
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,10 @@ impl PrecedenceParserDefinitionNodeExtensions for PrecedenceParserDefinitionNode
.map(|parser| quote! { seq.elem(#parser)?; })
.collect::<Vec<_>>();
quote! {
{
SequenceHelper::run(|mut seq| {
#(#parsers)*
seq.finish()
})
}
SequenceHelper::run(|mut seq| {
#(#parsers)*
seq.finish()
})
}
}

Expand All @@ -187,12 +185,10 @@ impl PrecedenceParserDefinitionNodeExtensions for PrecedenceParserDefinitionNode
})
.collect::<Vec<_>>();
quote! {
{
ChoiceHelper::run(input, |mut choice, input| {
#(#parsers)*
choice.finish(input)
})
}
ChoiceHelper::run(input, |mut choice, input| {
#(#parsers)*
choice.finish(input)
})
}
}

Expand Down
Loading

0 comments on commit c122f29

Please sign in to comment.