<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6] Implement ES6 arrow function syntax. Parser of arrow function with execution as common function"
href="https://bugs.webkit.org/show_bug.cgi?id=144955#c59">Comment # 59</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6] Implement ES6 arrow function syntax. Parser of arrow function with execution as common function"
href="https://bugs.webkit.org/show_bug.cgi?id=144955">bug 144955</a>
from <span class="vcard"><a class="email" href="mailto:saambarati1@gmail.com" title="Saam Barati <saambarati1@gmail.com>"> <span class="fn">Saam Barati</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=144955#c58">comment #58</a>)
<span class="quote">> Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=254445&action=diff" name="attach_254445" title="Patch">attachment 254445</a> <a href="attachment.cgi?id=254445&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=254445&action=review">https://bugs.webkit.org/attachment.cgi?id=254445&action=review</a>
>
> >> Source/JavaScriptCore/parser/Parser.cpp:607
> >> + bool correctArrowFinish = isEndOfArrowFunction() || match(EOFTOK);
> >
> > `match(EOFTOK)` is contained in `isEndOfArrowFunction()`. So I think `match(EOFTOK)` is not needed. Correct?
> > If so, we can change it to `failIfFalse(isEndOfArrowFunction(), "...");` by merging the following check.
>
> Done
>
> >> Source/JavaScriptCore/parser/Parser.cpp:608
> >> + failIfFalse(correctArrowFinish, "Expected a ';', ']', '}', ')', or ',' following a arrow function statement");
> >
> > it seems refering to EOF and Line terminator is needed.
>
> Done
>
> >> Source/JavaScriptCore/parser/Parser.cpp:1257
> >> + result = parseArrowFunctionStatement(context, parseType);
> >
> > This `parseArrowFunctionStatement` name confuses me.
> > This function is used when
> >
> > (e) `=> expr;`
> >
> > part, right? If so, I think clearer name is encouraged.
>
> I've renamed it to parseArrowFunctionExpression.</span >
Is this only used when parsing the sinle expression in the body syntax?
(If not, ignore the below.)
If so, I think this is a bad name. To me it sounds like the function
is named as if it's parsing the entire arrow function as an expression.
I'd be more verbose and go with a name like "parseArrowFunctionSingleExpressionBody"
or something else that indicates what the function is doing without any ambiguity.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>