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

https://codereview.chromium.org/1062263002/diff/1/src/parser.cc#newcode3394
src/parser.cc:3394: bindings_loc, "for_inof_loop_multi_bindings",
loop_type);
On 2015/04/07 21:14:28, arv wrote:
Another option is to have two different message keys.

yeah, I don't have a strong preference here. I had an idea that there
could just be a "for_loop_bad_lhs" message with a parameterized
loop-type and a parameterized reason for the invalidity, but adding
support for two arguments looked like more work. If two message keys are
preferred, that's what I'll do

https://codereview.chromium.org/1062263002/diff/1/src/parser.cc#newcode3443
src/parser.cc:3443: bool accept_IN = num_decl >= 1;
On 2015/04/07 21:14:28, arv wrote:
Not sure I understand? for-in loop cannot have more than one
declaration.

Right, but the error reported below is much clearer than the one that is
currently reported (unexpected token "in"/"of")

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

https://codereview.chromium.org/1062263002/diff/1/src/preparser.cc#newcode502
src/preparser.cc:502: if (bindings_loc) {
On 2015/04/07 21:14:28, arv wrote:
Is this right?

The logic is, if it's not a nullptr, set its dereferenced value to this
new location comprising of all of the declared variables.

now, it's not clear that the careful location picking is worthwhile,
because the chromium devtools don't seem to use them (as far as I can
tell). Could always get rid of these extra location pointers if it's not
worth it

https://codereview.chromium.org/1062263002/

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