https://codereview.chromium.org/1218803006/diff/1/src/parser.cc
File src/parser.cc (right):

https://codereview.chromium.org/1218803006/diff/1/src/parser.cc#newcode1385
src/parser.cc:1385: }
On 2015/07/06 21:26:12, Dan Ehrenberg wrote:
Do we want to interpret const as a variable (like let) if it is not
allowed? I
think it should be an error if we encounter const but we don't have a
reading to
interpret it (legacy or ES6).

It should do that already since CONST is a keyword.

https://codereview.chromium.org/1218803006/diff/1/src/parser.cc#newcode2435
src/parser.cc:2435: } else if (peek() == Token::CONST && allow_const())
{
On 2015/07/06 21:26:12, Dan Ehrenberg wrote:
How do we interpret the const token if const is not allowed?

The code is unreachable. The callers peek already.

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

https://codereview.chromium.org/1218803006/diff/1/src/preparser.cc#newcode197
src/preparser.cc:197: }
On 2015/07/06 21:26:12, Dan Ehrenberg wrote:
Error if allow_const is false?

ParseStatement will error.

https://codereview.chromium.org/1218803006/

--
--
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