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

Literal of ES2020 Violates the Principle of Unique #282

Open
clhiker opened this issue Apr 4, 2022 · 1 comment
Open

Literal of ES2020 Violates the Principle of Unique #282

clhiker opened this issue Apr 4, 2022 · 1 comment

Comments

@clhiker
Copy link

clhiker commented Apr 4, 2022

The type of Literal of ES2020 is same as type of ES5, which violates the principle of uniqueness.
I found this problem when I used the uniqueness principle to resolve non-terminators backward compatible

@JLHwung
Copy link
Contributor

JLHwung commented Apr 4, 2022

The type of Literal of ES2020 is same as type of ES5

Yes, this is how we extend current AST nodes. I don't think it violates the principle of uniqueness. On the contrary, the Literal type is an important example of uniqueness.

when I used the uniqueness principle to resolve non-terminators backward compatible

Can you elaborate?

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

No branches or pull requests

2 participants