Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index 8d17a18b78cc2298da610432679b054c951486b4..fe7492a207fb3a0dc95ab66592d4b5e9f7e641c6 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -2670,6 +2670,8 @@ ParserBase<Traits>::ParseUnaryExpression(ExpressionClassifier* classifier, |
default: |
break; |
} |
+ |
+ int await_pos = peek_position(); |
Consume(Token::AWAIT); |
ExpressionT value = ParseUnaryExpression(classifier, CHECK_OK); |
@@ -2677,7 +2679,7 @@ ParserBase<Traits>::ParseUnaryExpression(ExpressionClassifier* classifier, |
classifier->RecordFormalParameterInitializerError( |
Scanner::Location(beg_pos, scanner()->location().end_pos), |
MessageTemplate::kAwaitExpressionFormalParameter); |
- return Traits::RewriteAwaitExpression(value, beg_pos); |
+ return Traits::RewriteAwaitExpression(value, await_pos); |
} else { |
return this->ParsePostfixExpression(classifier, ok); |
} |