mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(parser): fix lexer error while parsing parenthesized arrow expressions (#3400)
closes #3399
This commit is contained in:
parent
bcdc658bbb
commit
6078a6d292
6 changed files with 10 additions and 9 deletions
|
|
@ -46,7 +46,7 @@ impl<'a> ParserImpl<'a> {
|
||||||
fn is_parenthesized_arrow_function_expression(&mut self) -> Tristate {
|
fn is_parenthesized_arrow_function_expression(&mut self) -> Tristate {
|
||||||
match self.cur_kind() {
|
match self.cur_kind() {
|
||||||
Kind::LParen | Kind::LAngle | Kind::Async => {
|
Kind::LParen | Kind::LAngle | Kind::Async => {
|
||||||
self.is_parenthesized_arrow_function_expression_worker()
|
self.lookahead(Self::is_parenthesized_arrow_function_expression_worker)
|
||||||
}
|
}
|
||||||
_ => Tristate::False,
|
_ => Tristate::False,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
codegen_misc Summary:
|
codegen_misc Summary:
|
||||||
AST Parsed : 16/16 (100.00%)
|
AST Parsed : 17/17 (100.00%)
|
||||||
Positive Passed: 16/16 (100.00%)
|
Positive Passed: 17/17 (100.00%)
|
||||||
|
|
|
||||||
1
tasks/coverage/misc/pass/oxc-3399.js
Normal file
1
tasks/coverage/misc/pass/oxc-3399.js
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
(/\./.exec())
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
parser_misc Summary:
|
parser_misc Summary:
|
||||||
AST Parsed : 16/16 (100.00%)
|
AST Parsed : 17/17 (100.00%)
|
||||||
Positive Passed: 16/16 (100.00%)
|
Positive Passed: 17/17 (100.00%)
|
||||||
Negative Passed: 9/9 (100.00%)
|
Negative Passed: 9/9 (100.00%)
|
||||||
|
|
||||||
× Unexpected token
|
× Unexpected token
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
prettier_misc Summary:
|
prettier_misc Summary:
|
||||||
AST Parsed : 16/16 (100.00%)
|
AST Parsed : 17/17 (100.00%)
|
||||||
Positive Passed: 9/16 (56.25%)
|
Positive Passed: 10/17 (58.82%)
|
||||||
Expect to Parse: "pass/oxc-1740.tsx"
|
Expect to Parse: "pass/oxc-1740.tsx"
|
||||||
Expect to Parse: "pass/oxc-2087.ts"
|
Expect to Parse: "pass/oxc-2087.ts"
|
||||||
Expect to Parse: "pass/oxc-2394.ts"
|
Expect to Parse: "pass/oxc-2394.ts"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
transformer_misc Summary:
|
transformer_misc Summary:
|
||||||
AST Parsed : 16/16 (100.00%)
|
AST Parsed : 17/17 (100.00%)
|
||||||
Positive Passed: 16/16 (100.00%)
|
Positive Passed: 17/17 (100.00%)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue