Clarify SyntaxErrors around yield and unskip tests
authorcaitp@igalia.com <caitp@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Aug 2016 02:36:28 +0000 (02:36 +0000)
committercaitp@igalia.com <caitp@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Aug 2016 02:36:28 +0000 (02:36 +0000)
commit0ae407f08762294ab92e26f2cdf175ac3fb70ed8
tree13d269ebff7fcc1fba869c1e0fe63cb1592ef054
parent00dee3ea32f19ef2c5a06c3b0554bac8cfb3c6a7
Clarify SyntaxErrors around yield and unskip tests
https://bugs.webkit.org/show_bug.cgi?id=158460

Reviewed by Saam Barati.

Fix and unskip tests which erroneously asserted that `yield` is not a
valid BindingIdentifier, and improve error message for YieldExpressions
occuring in Arrow formal parameters.

JSTests:

* stress/generator-syntax.js:
* stress/yield-out-of-generator.js:

Source/JavaScriptCore:

* parser/Parser.cpp:
(JSC::Scope::MaybeParseAsGeneratorForScope::MaybeParseAsGeneratorForScope):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseYieldExpression):
* parser/Parser.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/generator-syntax.js
JSTests/stress/yield-out-of-generator.js
JSTests/test262.yaml
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.cpp
Source/JavaScriptCore/parser/Parser.h