Updates:
Cc: [email protected]
Comment #6 on issue 4211 by [email protected]: Wrong precedence for
arrow function without parameters
https://code.google.com/p/v8/issues/detail?id=4211
Is there any chance that we can rectify arrow function parsing with
expression classifiers in a more consistent manner? With classifiers, is it
actually still necessary to peek, parse continuations, and spread arrows
over several places?
Why can't ParseAssignmentExpression simply recurse into
ParseConditionalExpression, parse the cover grammar, and let the classifier
track whether that's a valid parameter list OR a valid expression OR both.
When you get back, you commit to one of them based on the presence of the
arrow. You don't need to build multiple ASTs for that (which wouldn't be an
option), you just need to build one that can be rewritten into the other
form later.
In particular, I'm not sure why ParsePrimary consumes arrow bodies. Can't
it just completely ignore a following arrow token and everything after
that? All you seem to need would be a way to represent a pseudo expression
like () in the AST, so that you can later turn everything into a
FormalParameter objects.
Does that make sense? Or am I missing something?
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
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.