|
|
@ -416,10 +416,9 @@ where |
|
|
|
let tok = cursor.peek(0, interner).or_abrupt()?; |
|
|
|
let tok = cursor.peek(0, interner).or_abrupt()?; |
|
|
|
|
|
|
|
|
|
|
|
match *tok.kind() { |
|
|
|
match *tok.kind() { |
|
|
|
TokenKind::Keyword(( |
|
|
|
TokenKind::Keyword( |
|
|
|
Keyword::Function | Keyword::Class | Keyword::Const | Keyword::Let, |
|
|
|
(Keyword::Function | Keyword::Class | Keyword::Const, _) | (Keyword::Let, false), |
|
|
|
_, |
|
|
|
) => Declaration::new(self.allow_yield, self.allow_await) |
|
|
|
)) => Declaration::new(self.allow_yield, self.allow_await) |
|
|
|
|
|
|
|
.parse(cursor, interner) |
|
|
|
.parse(cursor, interner) |
|
|
|
.map(ast::StatementListItem::from), |
|
|
|
.map(ast::StatementListItem::from), |
|
|
|
TokenKind::Keyword((Keyword::Async, _)) => { |
|
|
|
TokenKind::Keyword((Keyword::Async, _)) => { |
|
|
|