[JSC] It should be possible create a label named let when parsing Statement in non...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Mar 2017 17:03:19 +0000 (17:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Mar 2017 17:03:19 +0000 (17:03 +0000)
commit0b0acdfd6427b17267dfe652fda1d04de3411f84
tree8a6558a9852e43efdafda996c7a9bfe23d3c8780
parent7d31e46f2c0b9a1c2558ed26d3abe2d03d198f59
[JSC] It should be possible create a label named let when parsing Statement in non strict mode
https://bugs.webkit.org/show_bug.cgi?id=168684

Patch by Caio Lima <ticaiolima@gmail.com> on 2017-03-13
Reviewed by Saam Barati.

JSTests:

* ChakraCore/test/LetConst/DeclOutofBlock.baseline-jsc:

Source/JavaScriptCore:

This patch is fixing a Parser bug to allow define a label named
```let``` in sloppy mode when parsing a Statement.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseStatement):

LayoutTests:

* js/let-syntax-expected.txt:
* js/script-tests/let-syntax.js:
(shouldNotHaveSyntaxErrorSloopyOnly):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChakraCore/test/LetConst/DeclOutofBlock.baseline-jsc
JSTests/ChangeLog
LayoutTests/ChangeLog
LayoutTests/js/let-syntax-expected.txt
LayoutTests/js/script-tests/let-syntax.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.cpp