Compare commits

...

4 Commits

Author SHA1 Message Date
Meghan Denny
17cbd84810 Merge branch 'main' into claude/modify-unexpected-error-return 2025-11-03 23:27:10 -08:00
Meghan Denny
3713abeb81 Merge branch 'main' into claude/modify-unexpected-error-return 2025-11-03 22:57:28 -08:00
Meghan Denny
88f4824273 Update bun-install.test.ts.snap 2025-11-03 22:51:31 -08:00
Claude Bot
346c4937bd Make unexpected function return SyntaxError after logging
Modified the `unexpected` function in js_lexer.zig to return
`error.SyntaxError` after adding the error to the log. This provides
explicit error propagation while maintaining existing error logging behavior.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-11 04:25:49 +00:00
2 changed files with 2 additions and 1 deletions

View File

@@ -1808,6 +1808,7 @@ fn NewLexer_(
lexer.did_panic = true;
try lexer.addRangeError(lexer.range(), "Unexpected {s}", .{found}, true);
return error.SyntaxError;
}
pub fn raw(noalias self: *const LexerType) []const u8 {

View File

@@ -5,7 +5,7 @@ exports[`should report error on invalid format for package.json 1`] = `
^
error: Unexpected foo
at [dir]/package.json:1:1
ParserError: failed to parse '[dir]/package.json'
SyntaxError: failed to parse '[dir]/package.json'
"
`;