[Webkit-unassigned] [Bug 144955] [ES6] Implement ES6 arrow function syntax. Parser of arrow function with execution as common function
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat May 16 00:58:40 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=144955
--- Comment #9 from Saam Barati <saambarati1 at gmail.com> ---
Comment on attachment 253195
--> https://bugs.webkit.org/attachment.cgi?id=253195
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=253195&action=review
This looks pretty good to me.
It may be worth opening up some follow up bugs that
will be aimed at getting this to be spec compliant (i.e lexical this, etc)
and adding this bug as blocking those bugs. It will make it explicit
what this patch does and doesn't have implemented.
>> Source/JavaScriptCore/parser/Parser.cpp:1203
>> + context.setEndOffset(result, m_lastTokenEndPosition.offset);
>
> What is this setEndOffset for?
Actually, this is wrong. How does this code not segfault?
setEndOffset is meant to be called with non-null AST nodes
> Source/JavaScriptCore/parser/Parser.cpp:1427
> + consume(OPENPAREN);
Nit: you can use next() here. We already know it's an open paren
> Source/JavaScriptCore/parser/Parser.cpp:2852
> + while (newCount--)
This should be tested.
> Source/JavaScriptCore/parser/Parser.cpp:2854
> + return base;
Do we currently throw when trying to 'new' an arrow function?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150516/1808fd0e/attachment-0001.html>
More information about the webkit-unassigned
mailing list