Browse Source

Allow escaped yield and await in labelled statement (#3117)

pull/3121/head
raskad 1 year ago committed by GitHub
parent
commit
73af19b2bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      boa_parser/src/parser/statement/mod.rs

2
boa_parser/src/parser/statement/mod.rs

@ -202,7 +202,7 @@ where
Ok(ast::Statement::Empty)
}
TokenKind::IdentifierName(_)
| TokenKind::Keyword((Keyword::Await | Keyword::Yield, false)) => {
| TokenKind::Keyword((Keyword::Await | Keyword::Yield, _)) => {
// Labelled Statement check
cursor.set_goal(InputElement::Div);
let tok = cursor.peek(1, interner)?;

Loading…
Cancel
Save