Skip to content

Commit

Permalink
Revert "Update boa/src/syntax/parser/statement/mod.rs"
Browse files Browse the repository at this point in the history
This reverts commit 4c0c123.
  • Loading branch information
Paul Lancaster committed Oct 11, 2020
1 parent f21ee51 commit 5eeea0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boa/src/syntax/parser/statement/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ where
let tok = cursor.peek(0)?.ok_or(ParseError::AbruptEnd)?;

match *tok.kind() {
TokenKind::Keyword(Keyword::Function | Keyword::Async) => {
TokenKind::Keyword(Keyword::Function) | TokenKind::Keyword(Keyword::Async) => {
if strict_mode && self.in_block {
return Err(ParseError::lex(LexError::Syntax(
"Function declaration in blocks not allowed in strict mode".into(),
Expand Down

0 comments on commit 5eeea0a

Please sign in to comment.