On 2015/06/10 13:43:53, rossberg wrote:
https://codereview.chromium.org/1178523002/diff/60001/src/preparser.h
File src/preparser.h (right):


https://codereview.chromium.org/1178523002/diff/60001/src/preparser.h#newcode2266
src/preparser.h:2266: ReportMessageAt(scanner()->peek_location(),
Nit: Should this really be an eager error here? It seems like it would report
something like

   (...x,y);

as a malformed rest parameter, although it's not even a parameter list.

It wouldn't, actually, because (... is parsed with a different case. But (x,
...y, z) would trigger this case.

But I don't even know.  At that point the production cannot be valid but we
don't know what error to signal. Do I set *ok=false? If I do so, then a whole chain of CHECK_OK's will trigger, but without having signalled an error. If I don't I guess I can continue to pack expressions into the Binary(COMMA) result I
guess, which is bogus but probably not dangerous at least.  I guess I'll do
that.


https://codereview.chromium.org/1178523002/diff/60001/test/mjsunit/harmony/arrow-rest-params.js#newcode6
test/mjsunit/harmony/arrow-rest-params.js:6:
Maybe add a few representative tests of syntax errors around arrows & rest.

Ack.

https://codereview.chromium.org/1178523002/

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