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

Spread in objects doesn't parse #1862

Closed
aslushnikov opened this Issue Oct 9, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@aslushnikov

aslushnikov commented Oct 9, 2017

Expected: The following javascript should parse correctly:

const b = [1,2,3];
const a = {
  ...b
};

Actual: esprima throws. (demo)

@vdsabev

This comment has been minimized.

Show comment
Hide comment
@vdsabev

vdsabev Oct 16, 2017

Related issue: #1588

vdsabev commented Oct 16, 2017

Related issue: #1588

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Nov 2, 2017

@aslushnikov See #1587. And be aware that @mikesherov can claim you are a troll when you report bugs!

ghost commented Nov 2, 2017

@aslushnikov See #1587. And be aware that @mikesherov can claim you are a troll when you report bugs!

@ariya

This comment has been minimized.

Show comment
Hide comment
@ariya

ariya Nov 20, 2017

Contributor

As @vdsabev mentioned, this was already tracked in #1588. It's still not part of the latest ECMA-262 spec, hence the stable version of Esprima (and the online demo) doesn't have it. The implementation however already exists in the master branch.

Contributor

ariya commented Nov 20, 2017

As @vdsabev mentioned, this was already tracked in #1588. It's still not part of the latest ECMA-262 spec, hence the stable version of Esprima (and the online demo) doesn't have it. The implementation however already exists in the master branch.

@ariya ariya closed this Nov 20, 2017

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Nov 20, 2017

@aslushnikov You could try Acorn + the spread plugin if you need this to work or are dependent of such feature so you don't have to wait until next year. BTW. Current Esprima implementation isn't up to date with the specs. See my open issue tickets. Or you could try Babylon or Cherow. Both are up to date.

ghost commented Nov 20, 2017

@aslushnikov You could try Acorn + the spread plugin if you need this to work or are dependent of such feature so you don't have to wait until next year. BTW. Current Esprima implementation isn't up to date with the specs. See my open issue tickets. Or you could try Babylon or Cherow. Both are up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment