Skip to content

fix(parser): fix incorrect token start in re_lex_right_angle#11204

Merged
graphite-app[bot] merged 1 commit intomainfrom
05-21-fix_parser_fix_incorrect_token_start_in_re_lex_right_angle_
May 21, 2025
Merged

fix(parser): fix incorrect token start in re_lex_right_angle#11204
graphite-app[bot] merged 1 commit intomainfrom
05-21-fix_parser_fix_incorrect_token_start_in_re_lex_right_angle_

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented May 21, 2025

fixes #11203

Copilot AI review requested due to automatic review settings May 21, 2025 05:12
@github-actions github-actions bot added A-parser Area - Parser C-bug Category - Bug labels May 21, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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());

Copy link
Member Author

Boshen commented May 21, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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-hq
Copy link

codspeed-hq bot commented May 21, 2025

CodSpeed Instrumentation Performance Report

Merging #11204 will not alter performance

Comparing 05-21-fix_parser_fix_incorrect_token_start_in_re_lex_right_angle_ (8e8dea5) with main (03390ad)

Summary

✅ 38 untouched benchmarks

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label May 21, 2025
Copy link
Member Author

Boshen commented May 21, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 05-21-fix_parser_fix_incorrect_token_start_in_re_lex_right_angle_ branch from 656f5e2 to 8e8dea5 Compare May 21, 2025 06:47
@graphite-app graphite-app bot merged commit 8e8dea5 into main May 21, 2025
24 checks passed
@graphite-app graphite-app bot deleted the 05-21-fix_parser_fix_incorrect_token_start_in_re_lex_right_angle_ branch May 21, 2025 06:54
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parser: lexer next_right_angle returns > with length more than 1

2 participants