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

Issue with preserving parenthesis #693

Closed
Lookout-ent opened this issue Mar 24, 2023 · 1 comment · Fixed by #694
Closed

Issue with preserving parenthesis #693

Lookout-ent opened this issue Mar 24, 2023 · 1 comment · Fixed by #694
Labels

Comments

@Lookout-ent
Copy link

Parenthesis is not preserved in case of logical expression
I'm using acorn for parsing.
Ex: const v = (e ?? null) && f.createElement() is getting reduced to const v = e ?? null && f.createElement()

I checked the code. apparently issue seems to be with precedence
?? should have lower precedence than &&
not sure if there are more bugs related to parenthesis preserving

I also wanted to know what's the long term support plan for astring ?
i see last release was in dec 2021.
are we planning to maintain it for future ecma releases ?

@davidbonnet
Copy link
Owner

davidbonnet commented May 17, 2023

Thanks @Lookout-ent for reporting this.

I also wanted to know what's the long term support plan for astring ?

Astring is being used in production on several projects and is maintained to follow spec updates.

i see last release was in dec 2021.

There have been more recent tags published to NPM since.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants