Looking good, especially like that the ugliness is mostly contained in the
Scanner. Mostly naming concerns below.


https://codereview.chromium.org/1295883002/diff/60001/src/preparser.h
File src/preparser.h (right):

https://codereview.chromium.org/1295883002/diff/60001/src/preparser.h#newcode3744
src/preparser.h:3744: bool ParserBase<Traits>::IsLetKeyword() {
How about "IsNextLetKeyword()"? I think that makes it clearer what this
is operating on.

https://codereview.chromium.org/1295883002/diff/60001/src/preparser.h#newcode3749
src/preparser.h:3749: Token::Value uber_next = PeekAhead();
next_next, maybe? See later comment.

https://codereview.chromium.org/1295883002/diff/60001/src/scanner.h
File src/scanner.h (right):

https://codereview.chromium.org/1295883002/diff/60001/src/scanner.h#newcode547
src/scanner.h:547: (current_.literal_chars == &literal_buffers_[0])
Why switch to using an array for this? The advantage of separate names
is that a typo is a compile-time error, instead of an OOB access at
runtime. I'd prefer to go back unless there's a particular need for
using an array.

https://codereview.chromium.org/1295883002/diff/60001/src/scanner.h#newcode750
src/scanner.h:750: TokenDesc uber_next_;  // desc for the token after
next (push-back)
I think "next_next_" is clearer in English. That's my vote for a name
unless Andreas has a better idea.

https://codereview.chromium.org/1295883002/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to