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

Paren expression is missing #107

Open
kdy1 opened this issue Dec 16, 2018 · 1 comment
Open

Paren expression is missing #107

kdy1 opened this issue Dec 16, 2018 · 1 comment

Comments

@kdy1
Copy link

kdy1 commented Dec 16, 2018

Note: It's not cst vs ast problem.

For class transformation, this is necessary.

Example usecase:

(Bar.__proto__ || Object.getPrototypeOf(Bar))
@maciejhirsz
Copy link
Member

If you really need it, you can use SequenceExpression with a single item.

You shouldn't have to do that though. The code generator should be able to check the operator precedence of things vs how they are nested in the AST, and insert parens around binary expressions that need them.

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