spread operator (...) as a new token

Allen Wirfs-Brock allen at wirfs-brock.com
Fri Jan 18 10:56:37 PST 2013


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.

Allen


On Jan 17, 2013, at 7:40 PM, Brandon Benvie wrote:

> This is implemented in esprima as a punctuator token as well: https://github.com/ariya/esprima/blob/harmony/esprima.js#L724
> 
> 
> On Thu, Jan 17, 2013 at 9:51 PM, Kang-Hao (Kenny) Lu <kanghaol at oupeng.com> wrote:
> 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] http://wiki.ecmascript.org/doku.php?id=harmony:spread#syntax
> 
> 
> Cheers,
> Kenny
> --
> Web Specialist, Oupeng Browser, Beijing
> Try Oupeng: http://www.oupeng.com/
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130118/00b02980/attachment-0001.html>


More information about the es-discuss mailing list