You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 'new_expression', just parse the constructor as an expression
This avoids the premature parsing decision that happened in the last commit.
However, we now get a conflict because of the '?.' token, for the following
token sequence:
new foo ?.
One one hand, the '?.' token may be part of a member_expression or
subscript_expression. In that case, we want to SHIFT the '?.' token
before creating the 'new_expression' node, in order to group things
like this:
'new' ( expression '?.' identifier) or
| |
----- member_expression ----
On the other hand, the '?.' token may be part of a 'call_expression',
in which case, the parser thinks we would want to create the
'new_expression' first, so as to group things like this:
( 'new' expression ) '?.' arguments
| |
-- new_expression --
This second conflicting interpretation arises because 'new_expression'
currently has *higher* precedence than 'call_expression' - we set the
precedences this way in PR #89.
0 commit comments