mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 20:32:10 +00:00
fix(parser): incorrect parsing of class accessor property name (#2386)
This commit is contained in:
parent
384d5acd7a
commit
73e116e8a1
2 changed files with 5 additions and 8 deletions
|
|
@ -172,7 +172,10 @@ impl<'a> ParserImpl<'a> {
|
|||
|
||||
let modifier = self.parse_class_element_modifiers(false);
|
||||
|
||||
let accessor = self.peek_kind().is_class_element_name_start() && self.eat(Kind::Accessor);
|
||||
let accessor = {
|
||||
let token = self.peek_token();
|
||||
!token.is_on_new_line && token.kind.is_class_element_name_start()
|
||||
} && self.eat(Kind::Accessor);
|
||||
|
||||
let accessibility = modifier.accessibility();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
codegen_runtime_test262 Summary:
|
||||
AST Parsed : 19407/19407 (100.00%)
|
||||
Positive Passed: 19258/19407 (99.23%)
|
||||
Positive Passed: 19260/19407 (99.24%)
|
||||
Expect to run correctly: "annexB/built-ins/String/prototype/substr/surrogate-pairs.js"
|
||||
But got a runtime error: Test262Error: start: 1 Expected SameValue(«<>», «\udf06») to be true
|
||||
|
||||
|
|
@ -205,9 +205,6 @@ But got a runtime error: TypeError: c[(intermediate value)] is not a function
|
|||
Expect to run correctly: "language/expressions/class/cpn-class-expr-fields-methods-computed-property-name-from-function-expression.js"
|
||||
But got a runtime error: TypeError: c[(intermediate value)] is not a function
|
||||
|
||||
Expect to run correctly: "language/expressions/class/elements/field-definition-accessor-no-line-terminator.js"
|
||||
But got a runtime error: SyntaxError: Unexpected identifier '$'
|
||||
|
||||
Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--1.js"
|
||||
But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError
|
||||
|
||||
|
|
@ -418,9 +415,6 @@ But got a runtime error: TypeError: c[(intermediate value)] is not a function
|
|||
Expect to run correctly: "language/statements/class/cpn-class-decl-fields-methods-computed-property-name-from-function-expression.js"
|
||||
But got a runtime error: TypeError: c[(intermediate value)] is not a function
|
||||
|
||||
Expect to run correctly: "language/statements/class/elements/field-definition-accessor-no-line-terminator.js"
|
||||
But got a runtime error: SyntaxError: Unexpected identifier '$'
|
||||
|
||||
Expect to run correctly: "language/statements/class/subclass/default-constructor-spread-override.js"
|
||||
But got a runtime error: Test262Error: @@iterator invoked
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue