Add a MemberName parse node category for member access expressions (#3549)

Use this new category to replace the unconstrained `NodeId` child of
`MemberAccessExpr ` and `PointerMemberAccessExpr`. For now this new
category matches `IdentifierName` and `BaseName`, but later this will be
expanded to support `a.(b.c)` and `p->(b.c)` syntactic forms.

QUESTION: Is it time to make a `node_category.def` x-macro file?
ANSWER: Not yet.
This commit is contained in:
josh11b
2023-12-28 22:29:30 +00:00
committed by GitHub
parent 83b5db9c1e
commit a602be89e2
5 changed files with 13 additions and 11 deletions
+1
View File
@@ -23,6 +23,7 @@ auto operator<<(llvm::raw_ostream& output, NodeCategory category)
}
CARBON_NODE_CATEGORY(Decl);
CARBON_NODE_CATEGORY(Expr);
CARBON_NODE_CATEGORY(MemberName);
CARBON_NODE_CATEGORY(Modifier);
CARBON_NODE_CATEGORY(NameComponent);
CARBON_NODE_CATEGORY(Pattern);