-
-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ast: ArrayExpressionElement
vs ExpressionArrayElement
is confusing
#6392
Comments
I would like to remove these "special cases" like |
We need a consensus on visiting these partial expressions. See context #4060 This was also brought up in the confusing partial visit of chain expression. I also had confusion when visiting assignment targets. |
AstKind
has two variants with almost identical names:AstKind::ArrayExpressionElement(_)
which contains anArrayExpressionElement
AstKind::ExpressionArrayElement(_)
which contains anExpression
.From digging around the code, it looks like
ExpressionArrayElement
is visited when anArrayExpressionElement
contains anExpression
Is this intentional? If it is, we should document the difference between the two since it's quite confusing. If not, we should remove one of these in favor of the other.
The text was updated successfully, but these errors were encountered: