spread operator (...) as a new token

Brandon Benvie brandon at brandonbenvie.com
Thu Jan 17 19:40:49 PST 2013


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130117/44620ad8/attachment.html>


More information about the es-discuss mailing list