MemberAccessExprSyntax.name/.declNameArguments should be a single IdentifierExprSyntax
Closed this issue · 4 comments
Description
MemberAccessExprSyntax
consists of a base
expression and a name
(and optional declNameArguments
.) Seems like it should really be composed of a base
and an IdentifierExprSyntax
(which contains both a name and declNameArguments already.) This would make it somewhat easier to splice off the base
expression.
Steps to Reproduce
No response
Tracked in Apple’s issue tracker as rdar://112479619
name
should be a DeclNameSyntax
IMO and I think there are more cases that would benefit from using DeclNameSyntax
instead of specifying the decl names themselves.
DeclNameSyntax
isn't an ExprSyntax
though, which poses problems if you're e.g. using a SyntaxRewriter
to strip base
off of a node. (Which is a thing I need to do.)
Arguably, IdentifierExprSyntax
is the exact same thing as a DeclNameSyntax
though. Harmonize the two types?
This was fixed by one of my recent renames of syntax nodes.