ES6 Classes: Extends should accept an expression without parenthesis
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 03:27:00 +0000 (03:27 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 03:27:00 +0000 (03:27 +0000)
commit0655683aacb2926f88b4e7fcc1cc4529a37101f1
tree1c6772394ccda74941f5804c8f1959fb74540962
parentdecbb3a0da5dea0dd29579bcaa3ac613669f024f
ES6 Classes: Extends should accept an expression without parenthesis
https://bugs.webkit.org/show_bug.cgi?id=142840

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClass):
"extends" allows a LeftHandExpression (new expression / call expression,
which includes a member expression), not a primary expression. Our
parseMemberExpression does all of these.

LayoutTests:

* js/class-syntax-extends-expected.txt:
* js/script-tests/class-syntax-extends.js:
Extend the test to test cases of extends with different types of expressions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/class-syntax-extends-expected.txt
LayoutTests/js/script-tests/class-syntax-extends.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.cpp