Skip to content

fix(lexer): replace unimplemented! with syntax error for unknown oper…#4985

Open
tkshsbcue wants to merge 2 commits intoboa-dev:mainfrom
tkshsbcue:fix/operator-lexer-unimplemented-to-error-v2
Open

fix(lexer): replace unimplemented! with syntax error for unknown oper…#4985
tkshsbcue wants to merge 2 commits intoboa-dev:mainfrom
tkshsbcue:fix/operator-lexer-unimplemented-to-error-v2

Conversation

@tkshsbcue
Copy link
Contributor

fix(lexer): replace unimplemented! with syntax error for unknown operators

Replace unimplemented!("operator {}", op) in the operator lexer with Err(Error::syntax(...)). Unknown operator bytes now produce a recoverable syntax error instead of panicking.

@tkshsbcue tkshsbcue requested a review from a team as a code owner March 10, 2026 15:18
…ators

When the operator lexer encounters an unexpected byte, return
Err(Error::syntax(...)) instead of panicking.

Made-with: Cursor
@tkshsbcue tkshsbcue force-pushed the fix/operator-lexer-unimplemented-to-error-v2 branch from b1d4f48 to 74ef259 Compare March 10, 2026 15:24
@github-actions
Copy link

github-actions bot commented Mar 10, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 49,932 49,932 0
Ignored 2,210 2,210 0
Failed 821 821 0
Panics 0 0 0
Conformance 94.28% 94.28% 0.00%

Tested main commit: 5207a3b22cb002f47fac999539c68f1ffe9bc289
Tested PR commit: d7b554eabd677c9baa6a584ca198b24efd96f352
Compare commits: 5207a3b...d7b554e

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.53%. Comparing base (6ddc2b4) to head (d7b554e).
⚠️ Report is 837 commits behind head on main.

Files with missing lines Patch % Lines
core/parser/src/lexer/operator.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4985       +/-   ##
===========================================
+ Coverage   47.24%   58.53%   +11.28%     
===========================================
  Files         476      560       +84     
  Lines       46892    61709    +14817     
===========================================
+ Hits        22154    36119    +13965     
- Misses      24738    25590      +852     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Thanks!

@jedel1043 jedel1043 added C-Parser Issues surrounding the parser A-Technical Debt Changes related to technical debt labels Mar 13, 2026
@jedel1043 jedel1043 enabled auto-merge March 13, 2026 06:36
@jedel1043
Copy link
Member

You don't need to merge if you don't have merge conflicts by the way, our merge queue already resolves those.

@tkshsbcue
Copy link
Contributor Author

Sorry my bad @jedel1043

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Technical Debt Changes related to technical debt C-Parser Issues surrounding the parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants