fix: polish error message for invalid binary 0b19 by JLHwung · Pull Request #18239 · babel/babel · GitHub
Skip to content

fix: polish error message for invalid binary 0b19 - #18239

Merged
JLHwung merged 2 commits into
babel:mainfrom
JLHwung:fix-14146
Sep 14, 2026
Merged

JLHwung merged 2 commits into
babel:mainfrom
JLHwung:fix-14146

Conversation

@JLHwung

@JLHwung JLHwung commented Sep 14, 2026

Copy link
Copy Markdown
Contributor
Q                       A
Fixed Issues? Fixes #14146
Patch: Bug Fix? Y
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

In this PR we remove the errorRecovery detection logic in invalidDigit handler. In general the errorRecovery should only be handled in parser#raise and it should not interfere with the parser logic.

@JLHwung JLHwung added PR: Polish 💅 A type of pull request used for our changelog categories pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories and removed PR: Polish 💅 A type of pull request used for our changelog categories labels Sep 14, 2026
@babel-bot

babel-bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/62132

@pkg-pr-new

pkg-pr-new Bot commented Sep 14, 2026

Copy link
Copy Markdown

@JLHwung
JLHwung merged commit a31ccb6 into babel:main Sep 14, 2026
57 checks passed
@JLHwung
JLHwung deleted the fix-14146 branch September 14, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Incorrect MissingSemicolon SyntaxError when errorRecovery is false, but correct InvalidDigit SyntaxError when errorRecovery is true

4 participants