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

AST node type mismatch #419

Open
RReverser opened this issue Jun 14, 2019 · 1 comment
Open

AST node type mismatch #419

RReverser opened this issue Jun 14, 2019 · 1 comment

Comments

@RReverser
Copy link
Member

Not sure if this was introduced when migrating Shift conversions to JS or existed earlier, but, either way, currently:

let {x: y = 1} = {};

fails to parse/encode with

Could not parse source: JSONError(Error("unknown variant `BindingWithDefault`, expected one of `BindingWithInitializer`, `ObjectBinding`, `BindingIdentifier`, `ArrayBinding`", line: 1, column: 325))

because corresponding Shift node is called BindingWithDefault, but BinaryAST node is called BindingWithInitializer.

Either from-shift.js should be adjusted to convert this node type, or BinaryAST node should be renamed.

@Yoric
Copy link
Collaborator

Yoric commented Sep 19, 2019

@xtuc want to take this? If possible, I'd like the fix to be in from_shift.js.

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