Skip to content
This repository has been archived by the owner on Jan 14, 2019. It is now read-only.

fix: correct detection of destructing assigment #61

Closed
wants to merge 2 commits into from

Conversation

armano2
Copy link
Contributor

@armano2 armano2 commented Dec 23, 2018

This PR fixes issues with ArrayExpression & ObjectExpression not being correctly parsed as such.

example of fixed expression:

({
  foo: {
    bar: {
      baz: [ a, { foo: [x] = [3] } = { foo: [2] }] = []
    } = {}
  } = {}
} = { foo: { bar: { baz: [2, { foo: [3] }] } } });

Program.body[0].expression.left.properties[0].value.right is currently showing up as ArrayPattern, babel, acorn and espree say it should be ArrayExpression

@armano2 armano2 closed this Dec 27, 2018
@armano2 armano2 deleted the destructuring-assignment branch December 28, 2018 20:02
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.

1 participant