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
So current grammar parses new Class(argument) not as NewExpressionwith singleExpression and arguments, but as NewExpression with only singleExpression, where then in turn singleExpression is parsed as singleExpression arguments.
So the issue is that NewExpression has ? for arguments in New singleExpression arguments?, so a different parsing path is chosen, where New singleExpression is followed, and then singleExpression expands back into singleExpression arguments.
Is there a way to fix grammar to prefer NewExpression case? If I change things to New singleExpression arguments then parsing is done correctly, but of course new with any arguments does not succeed anymore.
The text was updated successfully, but these errors were encountered:
So current grammar parses
new Class(argument)
not asNewExpression
withsingleExpression
andarguments
, but asNewExpression
with onlysingleExpression
, where then in turnsingleExpression
is parsed assingleExpression arguments
.The relevant bits of grammar are here:
So the issue is that
NewExpression
has?
forarguments
inNew singleExpression arguments?
, so a different parsing path is chosen, whereNew singleExpression
is followed, and thensingleExpression
expands back intosingleExpression arguments
.Is there a way to fix grammar to prefer
NewExpression
case? If I change things toNew singleExpression arguments
then parsing is done correctly, but of coursenew
with any arguments does not succeed anymore.The text was updated successfully, but these errors were encountered: