Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index e1e3d3412281a274f2a3d03079735cc7c113a2de..af038a7fd71b38fac37fa876f63fdd26eeb2f85a 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -1847,7 +1847,8 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParsePrimaryExpression( |
} |
// Heuristically try to detect immediately called functions before |
// seeing the call parentheses. |
- if (peek() == Token::FUNCTION) { |
+ if (peek() == Token::FUNCTION || |
+ (peek() == Token::ASYNC && PeekAhead() == Token::FUNCTION)) { |
function_state_->set_next_function_is_likely_called(); |
} |
ExpressionT expr = ParseExpressionCoverGrammar(true, CHECK_OK); |