Skip to content

Commit

Permalink
fix(parser): fix lexer error while parsing parenthesized arrow expres…
Browse files Browse the repository at this point in the history
…sions (#3400)

closes #3399
  • Loading branch information
Boshen committed May 24, 2024
1 parent bcdc658 commit 6078a6d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/oxc_parser/src/js/arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl<'a> ParserImpl<'a> {
fn is_parenthesized_arrow_function_expression(&mut self) -> Tristate {
match self.cur_kind() {
Kind::LParen | Kind::LAngle | Kind::Async => {
self.is_parenthesized_arrow_function_expression_worker()
self.lookahead(Self::is_parenthesized_arrow_function_expression_worker)
}
_ => Tristate::False,
}
Expand Down
4 changes: 2 additions & 2 deletions tasks/coverage/codegen_misc.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
codegen_misc Summary:
AST Parsed : 16/16 (100.00%)
Positive Passed: 16/16 (100.00%)
AST Parsed : 17/17 (100.00%)
Positive Passed: 17/17 (100.00%)
1 change: 1 addition & 0 deletions tasks/coverage/misc/pass/oxc-3399.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(/\./.exec())
4 changes: 2 additions & 2 deletions tasks/coverage/parser_misc.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parser_misc Summary:
AST Parsed : 16/16 (100.00%)
Positive Passed: 16/16 (100.00%)
AST Parsed : 17/17 (100.00%)
Positive Passed: 17/17 (100.00%)
Negative Passed: 9/9 (100.00%)

× Unexpected token
Expand Down
4 changes: 2 additions & 2 deletions tasks/coverage/prettier_misc.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
prettier_misc Summary:
AST Parsed : 16/16 (100.00%)
Positive Passed: 9/16 (56.25%)
AST Parsed : 17/17 (100.00%)
Positive Passed: 10/17 (58.82%)
Expect to Parse: "pass/oxc-1740.tsx"
Expect to Parse: "pass/oxc-2087.ts"
Expect to Parse: "pass/oxc-2394.ts"
Expand Down
4 changes: 2 additions & 2 deletions tasks/coverage/transformer_misc.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
transformer_misc Summary:
AST Parsed : 16/16 (100.00%)
Positive Passed: 16/16 (100.00%)
AST Parsed : 17/17 (100.00%)
Positive Passed: 17/17 (100.00%)

0 comments on commit 6078a6d

Please sign in to comment.