[JSC] report unexpected token when "async" is followed by identifier
authorcaitp@igalia.com <caitp@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Dec 2016 22:20:08 +0000 (22:20 +0000)
committercaitp@igalia.com <caitp@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Dec 2016 22:20:08 +0000 (22:20 +0000)
commit36050a314ad35fc3d0da1d564fe01beacf20238a
treefaf1333b1092fbcc9ffb6d220f13fea7172cf766
parent7c82e06fecc40d75b57b7ac233fcf72f71c1c79b
[JSC] report unexpected token when "async" is followed by identifier
https://bugs.webkit.org/show_bug.cgi?id=165091

Reviewed by Mark Lam.

JSTests:

* stress/bug-165091.js:

Source/JavaScriptCore:

Report a SyntaxError, in order to report correct error in contexts
an async ArrowFunction cannot occur. Also corrects errors in comment
describing JSTokenType bitfield, which was added in r209293.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/ParserTokens.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209350 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/bug-165091.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.cpp
Source/JavaScriptCore/parser/ParserTokens.h