https://codereview.chromium.org/671913002/diff/1/src/preparser.cc
File src/preparser.cc (right):

https://codereview.chromium.org/671913002/diff/1/src/preparser.cc#newcode466
src/preparser.cc:466: (is_strict_const && peek() == Token::COMMA)) {
I don't understand this condition. If it is true, you always will
produce a syntax error on the next line. Is that intentional? If so,
perhaps put in an explanatory comment (or refactor).

https://codereview.chromium.org/671913002/diff/1/src/preparser.cc#newcode684
src/preparser.cc:684: bool is_let_or_strict_const =
Nit: how about naming this 'is_lexical'?

https://codereview.chromium.org/671913002/diff/1/test/cctest/test-parsing.cc
File test/cctest/test-parsing.cc (right):

https://codereview.chromium.org/671913002/diff/1/test/cctest/test-parsing.cc#newcode4215
test/cctest/test-parsing.cc:4215: const char* data[] = {"for(const x =
1; ; ) {}", "for(const x in [1,2,3]) {}",
Add a case like "for (const x = 1, y = 2; ; )".

https://codereview.chromium.org/671913002/diff/1/test/cctest/test-parsing.cc#newcode4233
test/cctest/test-parsing.cc:4233: "for(const x = 4, y of [1,2,3]) {}",
Add "for (const x, y in/of [])".

https://codereview.chromium.org/671913002/diff/1/test/mjsunit/regress/regress-2506.js
File test/mjsunit/regress/regress-2506.js (right):

https://codereview.chromium.org/671913002/diff/1/test/mjsunit/regress/regress-2506.js#newcode6
test/mjsunit/regress/regress-2506.js:6: 'use strict';
Nit: empty line before.

https://codereview.chromium.org/671913002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to