spread operator (...) as a new token

# Kang-Hao (Kenny) Lu (12 years ago)

Is "..." a new token that should be listed in Punctuator. I think it should and it seems like a little miss for which I am happy to file a bug, but I am not so sure as the proposal[1] doesn't include it.

It seems that Firefox implements it as a token. Test cases:

function x(. ..y) {}

function x(./**/..y) {}

. Both throw SyntaxError in Firefox 17.

[1] harmony:spread#syntax

# Brandon Benvie (12 years ago)

This is implemented in esprima as a punctuator token as well: ariya/esprima/blob/harmony/esprima.js#L724

# Allen Wirfs-Brock (12 years ago)

It's suposed to be a single token. I just updated section 7.7 in my working draft of the ES6 spec. to make this explicit.