https://codereview.chromium.org/1309813007/diff/1/src/expression-classifier.h
File src/expression-classifier.h (right):
https://codereview.chromium.org/1309813007/diff/1/src/expression-classifier.h#newcode158
src/expression-classifier.h:158: void RecordPatternError(const
Scanner::Location& loc,
BindingPatternErrors and AssignmentPatternErrors being separate seems
odd to me, from scanning the parser code it looks like the latter
implies the former. This might be an opportunity to unify them somewhat.
https://codereview.chromium.org/1309813007/diff/1/src/preparser.h
File src/preparser.h (right):
https://codereview.chromium.org/1309813007/diff/1/src/preparser.h#newcode1134
src/preparser.h:1134: kArrayLiteralExpression
Do Object and Array literals need to be distinguished in the preparser?
It seems like the added checks are satisfied by either.
https://codereview.chromium.org/1309813007/diff/1/src/preparser.h#newcode3008
src/preparser.h:3008: if (is_pattern_element) {
It seems to me that the classifier should always record the error, and
it should be the responsibility of the caller to only convert this to a
"real" parser error if it's appropriate. I appreciate this might not be
possible to arrange, however.
https://codereview.chromium.org/1309813007/diff/1/src/preparser.h#newcode3048
src/preparser.h:3048: } else if (assignment_pattern) {
unifying the two errors would clean up this code
https://codereview.chromium.org/1309813007/
--
--
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.