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,
On 2015/08/27 15:16:01, caitp wrote:
On 2015/08/27 09:40:26, conradw wrote:
> 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.

There are cases where they do need to be separate. EG, `[ a.b.c ]` is
a valid
AssignmentPattern, but not a valid BindingPattern. I think it's likely
that in
the majority of cases, they are the same though.

I was thinking it might be possible to eliminate/combine the
assignment_pattern_error_ object, since every time
assignment_pattern_error_ is set, binding_pattern_error_ is set
identically. From what you're saying, there would still need to be two
separate bits in invalid_productions_ however.

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.

Reply via email to