Skip to content

Conversation

@matetokodi
Copy link
Contributor

Also added regression test cases: Samsung/js_vendor_tc#97

}
this->consumeSemicolon();
} else if (this->lookahead.type == Token::KeywordToken) {
} else if (this->lookahead.type == Token::KeywordToken || this->matchAsyncFunction()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The matchAsyncFunction() call appears twice: once in the outer condition and again inside the block. If matchAsyncFunction() consumes the 'async' keyword, the second call will see a different lookahead, causing the async function to be parsed incorrectly. Remove the outer call or store its result to avoid double consumption.

Add mjs file matching to regression test script
@matetokodi matetokodi force-pushed the fix_esm_async_export branch from 0930cef to 3c6889a Compare January 27, 2026 17:49
@ksh8281 ksh8281 merged commit fb2ad1e into Samsung:master Jan 28, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants