Daniel Tschinder 1b612148bf "yield" parsing inside function name and parameters (#689)
* Use parseFunctionParams to parse method parameters

* [funct] Set this.state.inGenerator before parsing the function name/params

This allows "yield" inside generator parameters to be actually
parsed as a yield expression

* [funct] Disallow yield in function parameters

* [arrow] "yield" can start an arrow function (e.g. "yield => {}")

* [arrow] Disallow YieldExpressions inside arrow parameters.

* [err msg] Disallow yield as fn name in strict mode using checkReservedWord.

So Babylon throws "yield is a reserved word" instead of
a custom "Binding yield in strict mode"

* [err msg] "X is reserved in strict mode" should have precedence over "X is reserved", since it is more specific.

This was observable if "checkKeywords" is true and the word is both a keyword and a reserved
word in strict mode

* Disallow "yield" as an identifier inside generators

* [tests] Add tests, update wrong esprima tests and enable disabled esprima tests

* [tests] Move uncategorized tests to es2015/yield

* [tests] Update test262 whitelist

* Fix regression introduced by 8c77073

* [tests] Update flow whitelist

* Fix flow errors
2017-11-01 16:05:18 +01:00
..
2017-04-07 15:52:19 +02:00