Skip to content

Commit

Permalink
Fix minor parsing errors
Browse files Browse the repository at this point in the history
Signed-off-by: HyukWoo Park <[email protected]>
  • Loading branch information
clover2123 authored and ksh8281 committed Sep 26, 2024
1 parent 7365c2a commit cd4b7dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/parser/esprima_cpp/esprima.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@

#define BEGIN_FUNCTION_SCANNING(name) \
NEW_FUNCTION_AST_BUILDER() \
auto oldInParameterParsing = this->context->inParameterParsing; \
auto oldSubCodeBlockIndex = ++this->subCodeBlockIndex; \
auto oldScopeContext = pushScopeContext(name); \
this->context->inParameterParsing = false; \
if (UNLIKELY(this->currentClassInfo != nullptr)) { \
if (this->currentClassInfo->m_firstMethod \
&& this->currentScopeContext == this->currentClassInfo->m_lastMethod->m_nextSibling) { \
Expand All @@ -91,7 +93,8 @@
this->lexicalBlockCount = lexicalBlockCountBefore; \
this->currentScopeContext->m_lexicalBlockIndexFunctionLocatedIn = lexicalBlockIndexBefore; \
popScopeContext(oldScopeContext); \
this->subCodeBlockIndex = oldSubCodeBlockIndex;
this->subCodeBlockIndex = oldSubCodeBlockIndex; \
this->context->inParameterParsing = oldInParameterParsing;

using namespace Escargot::EscargotLexer;

Expand Down Expand Up @@ -3558,6 +3561,8 @@ class Parser {
template <class ASTBuilder>
ASTNode parseStatementListItem(ASTBuilder& builder)
{
checkRecursiveLimit();

ASTNode statement = nullptr;
this->context->isAssignmentTarget = true;
this->context->isBindingElement = true;
Expand Down
2 changes: 1 addition & 1 deletion test/vendortest

0 comments on commit cd4b7dd

Please sign in to comment.