MemberExpression issue

16 views
Skip to first unread message

Dima Vidmich

unread,
Jun 23, 2015, 2:25:33 AM6/23/15
to esp...@googlegroups.com
Hi,

I don't know is it a bug or I'm doing something wrong.

For for.bar and foo[bar]  I got the same AST
Shouldn't it be converted to Literal instead of Identifier in first case?

Chris Toshok

unread,
Jun 23, 2015, 4:28:26 PM6/23/15
to esp...@googlegroups.com
Arguably.  I think the shift parser/ast does something like this?

In esprima the differentiator for these cases is the .computed attribute on MemberExpressions.  it'll be true for the second, false for the first.

--
You received this message because you are subscribed to the Google Groups "esprima" group.
To unsubscribe from this group and stop receiving emails from it, send an email to esprima+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages