fix(parser): fix incorrect token start in re_lex_right_angle#11204
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the incorrect token start in the lexer function handling right-angle tokens. Key changes include:
- Renaming the function from next_right_angle to re_lex_right_angle and updating its implementation.
- Removing a debug assert in token finalization.
- Updating the cursor to call the new re_lex_right_angle function.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/oxc_parser/src/lexer/punctuation.rs | Updated right-angle lexing with proper token start initialization. |
| crates/oxc_parser/src/lexer/mod.rs | Removed debug_assert to align with the updated token boundary handling. |
| crates/oxc_parser/src/cursor.rs | Updated to reference the renamed re_lex_right_angle API. |
Comments suppressed due to low confidence (1)
crates/oxc_parser/src/lexer/mod.rs:219
- The debug_assert removal may hide token boundary issues; please ensure that the invariant is validated elsewhere or add tests to safeguard against regressions.
debug_assert!(self.token.start() <= self.token.end());
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 #11204 will not alter performanceComparing Summary
|
Merge activity
|
656f5e2 to
8e8dea5
Compare

fixes #11203