Add macro for postfix operators. (#3504)

Per request on #3481, for consistency with prefix/infix.
This commit is contained in:
Jon Ross-Perkins
2023-12-13 23:54:27 +00:00
committed by GitHub
parent add31eb4e3
commit e343ea593c
3 changed files with 42 additions and 17 deletions
+3 -1
View File
@@ -333,7 +333,6 @@ class NodeStack {
case Parse::NodeKind::MemberAccessExpr:
case Parse::NodeKind::PackageExpr:
case Parse::NodeKind::ParenExpr:
case Parse::NodeKind::PostfixOperatorStar:
case Parse::NodeKind::ReturnType:
case Parse::NodeKind::SelfTypeNameExpr:
case Parse::NodeKind::SelfValueNameExpr:
@@ -387,6 +386,9 @@ class NodeStack {
#define CARBON_PARSE_NODE_KIND_INFIX_OPERATOR(Name, ...) \
case Parse::NodeKind::InfixOperator##Name: \
return IdKind::InstId;
#define CARBON_PARSE_NODE_KIND_POSTFIX_OPERATOR(Name, ...) \
case Parse::NodeKind::PostfixOperator##Name: \
return IdKind::InstId;
#define CARBON_PARSE_NODE_KIND_PREFIX_OPERATOR(Name, ...) \
case Parse::NodeKind::PrefixOperator##Name: \
return IdKind::InstId;