perf(parser): remove a lookahead from eat_modifiers_before_declaration#20755
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR removes a redundant modifier lookahead in the parser’s eat_modifiers_before_declaration, relying on the existing while self.at_modifier() loop condition to avoid doing the same lookahead twice.
Changes:
- Removed an early
at_modifier()check/return ineat_modifiers_before_declarationto eliminate duplicate lookahead work.
c0f2445 to
aac33f9
Compare
6bd2ce0 to
793034c
Compare
Merge activity
|
793034c to
5f64ec6
Compare
…on` (#20755) Remove an unnecessary lookahead from `eat_modifiers_before_declaration`. The loop below already does this check. There's no point doing it twice, especially as lookaheads aren't so cheap.
aac33f9 to
f4f8674
Compare
…on` (#20755) Remove an unnecessary lookahead from `eat_modifiers_before_declaration`. The loop below already does this check. There's no point doing it twice, especially as lookaheads aren't so cheap.
5f64ec6 to
448aae5
Compare
f4f8674 to
4e8b817
Compare

Remove an unnecessary lookahead from
eat_modifiers_before_declaration. The loop below already does this check. There's no point doing it twice, especially as lookaheads aren't so cheap.