<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:sbarati&#64;apple.com" title="Saam Barati &lt;sbarati&#64;apple.com&gt;"> <span class="fn">Saam Barati</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [JSC] It should be possible create a label named let when parsing Statement in non strict mode"
   href="https://bugs.webkit.org/show_bug.cgi?id=168684">bug 168684</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #304118 Flags</td>
           <td>review?
           </td>
           <td>review+
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [JSC] It should be possible create a label named let when parsing Statement in non strict mode"
   href="https://bugs.webkit.org/show_bug.cgi?id=168684#c13">Comment # 13</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [JSC] It should be possible create a label named let when parsing Statement in non strict mode"
   href="https://bugs.webkit.org/show_bug.cgi?id=168684">bug 168684</a>
              from <span class="vcard"><a class="email" href="mailto:sbarati&#64;apple.com" title="Saam Barati &lt;sbarati&#64;apple.com&gt;"> <span class="fn">Saam Barati</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=304118&amp;action=diff" name="attach_304118" title="Patch">attachment 304118</a> <a href="attachment.cgi?id=304118&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=304118&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=304118&amp;action=review</a>

r=me with comments

<span class="quote">&gt; Source/JavaScriptCore/parser/Parser.cpp:1729
&gt; +    case LET: {
&gt; +        if (!strictMode()) {
&gt; +            bool allowFunctionDeclarationAsStatement = false;
&gt; +            result = parseExpressionOrLabelStatement(context, allowFunctionDeclarationAsStatement);
&gt; +            shouldSetPauseLocation = !context.shouldSkipPauseLocation(result);
&gt; +            break;
&gt; +        }
&gt; +        goto defaultCase;
&gt; +    }</span >

This is duplicate code with he IDENT/AWAIT/YIELD case below. Maybe add a goto to that case, or make a lambda that is called both here and there.

<span class="quote">&gt; LayoutTests/js/script-tests/let-syntax.js:56
&gt; +function shouldNotHaveSyntaxErrorSloopyOnly(str)</span >

Typo: &quot;Sloopy&quot; =&gt; &quot;Sloppy&quot;

<span class="quote">&gt; LayoutTests/js/script-tests/let-syntax.js:96
&gt; +shouldNotHaveSyntaxErrorSloopyOnly(&quot;let x; with ({}) let: y = 3;&quot;);</span >

Can you also add a test where you omit the &quot;:&quot; after the label. Something like:

&quot;let x; with ({}) let y = 3;&quot;

And it should be a syntax error in sloppy mode.</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>