Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage of async and import in comma expression #254

Merged
merged 4 commits into from Mar 29, 2024

Conversation

DimaIT
Copy link
Contributor

@DimaIT DimaIT commented Mar 25, 2024

Fixes usage of async and import in comma expressions, like:

async = 1, b = 2;
b = 2, async = 1;
import.meta, 1;

@DimaIT DimaIT changed the title Fix assignment to async in comma expression Fix usage of async and import in comma expression Mar 25, 2024
@@ -3574,6 +3581,8 @@ export function parseAsyncExpression(
if (inNew) report(parser, Errors.InvalidAsyncArrow);
return parseArrowFromIdentifier(parser, context, parser.tokenValue, expr, inNew, canAssign, 0, start, line, column);
}

parser.assignable = AssignmentKind.Assignable;
Copy link
Member

Choose a reason for hiding this comment

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

Given your change on line 1114, should this line be added before line 2694?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems not needed here, added a couple more test-cases to cover it

@3cp 3cp merged commit 9b12d05 into meriyah:master Mar 29, 2024
3 checks passed
@3cp
Copy link
Member

3cp commented Mar 31, 2024

v4.4.1 is released.

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.

None yet

2 participants