Browse Source

Update boa/src/syntax/parser/statement/declaration/mod.rs

Co-authored-by: Halid Odat <halidodat@gmail.com>
pull/836/head
Paul Lancaster 4 years ago committed by GitHub
parent
commit
46b2917530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      boa/src/syntax/parser/statement/declaration/mod.rs

2
boa/src/syntax/parser/statement/declaration/mod.rs

@ -63,7 +63,7 @@ where
let tok = cursor.peek(0)?.ok_or(ParseError::AbruptEnd)?;
match tok.kind() {
TokenKind::Keyword(Keyword::Function) | TokenKind::Keyword(Keyword::Async) => {
TokenKind::Keyword(Keyword::Function | Keyword::Async) => {
HoistableDeclaration::new(self.allow_yield, self.allow_await, false).parse(cursor)
}
TokenKind::Keyword(Keyword::Const) | TokenKind::Keyword(Keyword::Let) => {

Loading…
Cancel
Save