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

Invalid range in AssignmentPattern #1201

Closed
ariya opened this issue Jun 24, 2015 · 2 comments
Closed

Invalid range in AssignmentPattern #1201

ariya opened this issue Jun 24, 2015 · 2 comments
Assignees

Comments

@ariya
Copy link
Contributor

ariya commented Jun 24, 2015

The starting range for the AssignmentPattern in let {x=1} = y is undefined:

> var tree = require('./esprima').parse('let {x=1} = y', { range: true })
> tree.body[0].declarations[0].id.properties[0].value
{ range: [ undefined, 8 ],
  type: 'AssignmentPattern',
  left: { range: [ 5, 6 ], type: 'Identifier', name: 'x' },
  right: { range: [ 7, 8 ], type: 'Literal', value: 1, raw: '1' } }

(as discovered by @ikarienator)

@ariya
Copy link
Contributor Author

ariya commented Jun 25, 2015

@ikarienator Do you fancy taking a look at this one?

@ikarienator
Copy link
Contributor

I'm taking it!
On Thu, Jun 25, 2015 at 13:53 Ariya Hidayat [email protected]
wrote:

@ikarienator https://github.com/ikarienator Do you fancy taking a look
at this one?


Reply to this email directly or view it on GitHub
#1201 (comment).

ikarienator added a commit to ikarienator/esprima that referenced this issue Jun 28, 2015
Fixes jquery#1201: fixes incorrect ranges due to incorrect usage of `new
WrappingNode`.
Fixes jquery#1193: Incorrect error when using destructuring multiple times in params
ikarienator added a commit to ikarienator/esprima that referenced this issue Jun 28, 2015
Fixes jquery#1201: fixes incorrect ranges due to incorrect usage of `new
WrappingNode`.
Fixes jquery#1193: Incorrect error when using destructuring multiple times in params
ikarienator added a commit to ikarienator/esprima that referenced this issue Jun 29, 2015
Fixes jquery#1201: fixes incorrect ranges due to incorrect usage of `new
WrappingNode`.
Fixes jquery#1193: Incorrect error when using destructuring multiple times in params
ikarienator added a commit to ikarienator/esprima that referenced this issue Jun 29, 2015
Fixes jquery#1201: fixes incorrect ranges due to incorrect usage of `new
WrappingNode`.
Fixes jquery#1193: Incorrect error when using destructuring multiple times in params
ikarienator added a commit to ikarienator/esprima that referenced this issue Jun 29, 2015
Fixes jquery#1201: fixes incorrect ranges due to incorrect usage of `new
WrappingNode`.
Fixes jquery#1193: Incorrect error when using destructuring multiple times in params
ariya pushed a commit to ariya/esprima that referenced this issue Jun 30, 2015
Fixes jquery#1201: fixes incorrect ranges due to incorrect usage of `new
WrappingNode`.
Fixes jquery#1193: Incorrect error when using destructuring multiple times in params

Closes jquerygh-1213
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants