Skip to content

Commit

Permalink
Fix async arrow function parser bug
Browse files Browse the repository at this point in the history
Signed-off-by: Seonghyun Kim <[email protected]>
  • Loading branch information
ksh8281 authored and bbrto21 committed Sep 1, 2023
1 parent f56ea25 commit 2141345
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/parser/esprima_cpp/esprima.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3326,6 +3326,9 @@ class Parser {
this->validateParam(list, *token, exprNode->asIdentifier()->name());
list.params.push_back(builder.convertToParameterSyntaxNode(exprNode));
this->currentScopeContext->m_isAsync = isAsync;
if (isAsync) {
this->context->await = true;
}
} else {
this->scanner->index = startMarker.index;
this->scanner->lineNumber = startMarker.lineNumber;
Expand Down
2 changes: 1 addition & 1 deletion test/vendortest

0 comments on commit 2141345

Please sign in to comment.