mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(parser): parse [+In] in object binding initializer (#874)
closes #873
This commit is contained in:
parent
28f728f0c0
commit
7c8e6ab6f6
2 changed files with 3 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ impl<'a> Parser<'a> {
|
|||
let binding_identifier = BindingIdentifier::new(ident.name.clone(), ident.span);
|
||||
let identifier = self.ast.binding_identifier(binding_identifier);
|
||||
let left = self.ast.binding_pattern(identifier, None, false);
|
||||
self.parse_initializer(span, left)?
|
||||
self.with_context(Context::In, |p| p.parse_initializer(span, left))?
|
||||
} else {
|
||||
return Err(self.unexpected());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,3 +9,5 @@ for(new null(null in null);;);
|
|||
for(var[l=null in null]in null);
|
||||
|
||||
for(`${null in null}`;;);
|
||||
|
||||
for(var{async=null in null}of null); // #873
|
||||
|
|
|
|||
Loading…
Reference in a new issue