Addressed some nits... Last thing is probably to move generation of "raw"
strings into own function, for readability, as it is quite difficult to
understand now.
https://codereview.chromium.org/663683006/diff/400001/src/parser.cc
File src/parser.cc (right):
https://codereview.chromium.org/663683006/diff/400001/src/parser.cc#newcode3914
src/parser.cc:3914: allow_harmony_object_literals());
On 2014/11/12 09:23:21, marja wrote:
Here you need to set the allow_templates flag to reusable_preparser as
well.
Done.
https://codereview.chromium.org/663683006/diff/400001/src/parser.cc#newcode5062
src/parser.cc:5062: const ZoneList<Expression*>* cookedStrings =
lit->cooked();
On 2014/11/12 09:23:21, marja wrote:
Style: cookedStrings -> cooked_strings (+ other variables elsewhere)
Done.
https://codereview.chromium.org/663683006/diff/400001/src/parser.cc#newcode5070
src/parser.cc:5070: if (!expressions->length()) {
On 2014/11/12 09:23:21, marja wrote:
Style nit: if (expressions->length() == 0)
Done.
https://codereview.chromium.org/663683006/diff/400001/src/parser.cc#newcode5093
src/parser.cc:5093: for (int i = 0; i < cookedStrings->length(); ++i) {
On 2014/11/12 09:23:21, marja wrote:
Gets confusing with i, c and j; could you rename i to string_index or
sth, then
j could be raw_chars_from_index and c could be raw_chars_to_index. Or
something
along those lines.
Done. (I'm not sure this is much easier to read, though)
https://codereview.chromium.org/663683006/diff/400001/src/parser.cc#newcode5101
src/parser.cc:5101: // Normalize line endings
On 2014/11/12 09:23:21, marja wrote:
You could expand this comment to say what exactly is changed to what.
It's not
trivial to see from the code below.... \r\n is changed to \n, right?
Done.
https://codereview.chromium.org/663683006/
--
--
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.