Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Prevent (async () => {})() from causing ASTring to throw an error.#35

Merged
Avad3 merged 1 commit intoNebulaServices:mainfrom
FoxMoss:main
Aug 16, 2023
Merged

Prevent (async () => {})() from causing ASTring to throw an error.#35
Avad3 merged 1 commit intoNebulaServices:mainfrom
FoxMoss:main

Conversation

@FoxMoss
Copy link
Contributor

@FoxMoss FoxMoss commented Aug 15, 2023

The preserveParens option on acorn makes it use the (non-standard) ParenthesizedExpression node which cant be parsed by ASTring, making token based rewrites ineffective.

This took me hours to figure out.

@clovercrash clovercrash requested a review from Avad3 August 16, 2023 15:35
Copy link
Contributor

@Avad3 Avad3 left a comment

Choose a reason for hiding this comment

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

Ready to merge

@Avad3 Avad3 merged commit 761e967 into NebulaServices:main Aug 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants