-
-
Notifications
You must be signed in to change notification settings - Fork 723
refactor(parser): add StatementContext::TopLevelStatementList
#12806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(parser): add StatementContext::TopLevelStatementList
#12806
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Instrumentation Performance ReportMerging #12806 will not alter performanceComparing Summary
Footnotes |
Merge activity
|
Pure refactor. Allow parser functions to determine whether in top level context or not, by adding `TopLevelStatementList` variant to `StatementContext`. Also, re-order the variants to make `StatementContext::is_single_statement` as cheap as possible - with `StatementList` and `TopLevelStatementList` as first 2 variants, `is_single_statement` boils down to `self as u8 < 2`. This new variant is used in the next PR in this stack.
020e6f5 to
febb4fa
Compare
…project#12806) Pure refactor. Allow parser functions to determine whether in top level context or not, by adding `TopLevelStatementList` variant to `StatementContext`. Also, re-order the variants to make `StatementContext::is_single_statement` as cheap as possible - with `StatementList` and `TopLevelStatementList` as first 2 variants, `is_single_statement` boils down to `self as u8 < 2`. This new variant is used in the next PR in this stack.

Pure refactor. Allow parser functions to determine whether in top level context or not, by adding
TopLevelStatementListvariant toStatementContext.Also, re-order the variants to make
StatementContext::is_single_statementas cheap as possible - withStatementListandTopLevelStatementListas first 2 variants,is_single_statementboils down toself as u8 < 2.This new variant is used in the next PR in this stack.