<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6] Arrow function syntax. Arrow function should support the destructuring parameters."
href="https://bugs.webkit.org/show_bug.cgi?id=146934#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6] Arrow function syntax. Arrow function should support the destructuring parameters."
href="https://bugs.webkit.org/show_bug.cgi?id=146934">bug 146934</a>
from <span class="vcard"><a class="email" href="mailto:gskachkov@gmail.com" title="GSkachkov <gskachkov@gmail.com>"> <span class="fn">GSkachkov</span></a>
</span></b>
<pre>Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=268657&action=diff" name="attach_268657" title="Patch">attachment 268657</a> <a href="attachment.cgi?id=268657&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=268657&action=review">https://bugs.webkit.org/attachment.cgi?id=268657&action=review</a>
<span class="quote">>> Source/JavaScriptCore/parser/Parser.h:1080
>> +
>
> This code isn't correct.
> It won't parse:
> ```
> (a, b, {c}, [d], {e, f}) => ...;
> ```
>
> I suggest an alternate approach here:
> have this code check if we have the single parameter name with no parens case:
> ```
> let x = a=>a;
> ```
> and otherwise, we already know how to parse "(p1, p2, ...)" style parameter lists
> in another function in the parser. We should use that same code here. Either we use
> it directly as is (probably not possible), or we should abstract that code in such a way
> that this code can use it. That way, we don't have to places in the parser where we parse parameters.
>
> The reason we have this problem in the first place is that we have two places where we parse
> parameters, lets not make that mistake again.</span >
I've tried to use function that parse parameters - parseFormalParameters, however parseFormalParameters adds parsed parameters to current scope, so I had to make face scope to avoid errors.
Could you please check if it acceptable?</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>