Comments addressed.
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)) {
On 2014/10/23 09:44:54, rossberg wrote:
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).
Yes, intentional. Comment added.
https://codereview.chromium.org/671913002/diff/1/src/preparser.cc#newcode684
src/preparser.cc:684: bool is_let_or_strict_const =
On 2014/10/23 09:44:54, rossberg wrote:
Nit: how about naming this 'is_lexical'?
Done.
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]) {}",
On 2014/10/23 09:44:54, rossberg wrote:
Add a case like "for (const x = 1, y = 2; ; )".
Done.
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]) {}",
On 2014/10/23 09:44:54, rossberg wrote:
Add "for (const x, y in/of [])".
Done.
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';
On 2014/10/23 09:44:54, rossberg wrote:
Nit: empty line before.
Done.
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.