#define LAST_EXPR(CLASS)
#endif
+#ifndef EXPR
+# define EXPR(Type, Base) STMT(Type, Base)
+#endif
+
// Normal Statements.
STMT(NullStmt , Stmt)
FIRST_STMT(NullStmt)
LAST_STMT(CXXTryStmt)
// Expressions.
-STMT(Expr , Stmt)
+EXPR(Expr , Stmt)
FIRST_EXPR(Expr)
-STMT(PredefinedExpr , Expr)
-STMT(DeclRefExpr , Expr)
-STMT(IntegerLiteral , Expr)
-STMT(FloatingLiteral , Expr)
-STMT(ImaginaryLiteral , Expr)
-STMT(StringLiteral , Expr)
-STMT(CharacterLiteral , Expr)
-STMT(ParenExpr , Expr)
-STMT(UnaryOperator , Expr)
-STMT(SizeOfAlignOfExpr , Expr)
-STMT(ArraySubscriptExpr , Expr)
-STMT(CallExpr , Expr)
-STMT(MemberExpr , Expr)
-STMT(CastExpr , Expr)
-STMT(BinaryOperator , Expr)
-STMT(CompoundAssignOperator, BinaryOperator)
-STMT(ConditionalOperator , Expr)
-STMT(ImplicitCastExpr , CastExpr)
-STMT(ExplicitCastExpr , CastExpr)
-STMT(CStyleCastExpr , ExplicitCastExpr)
-STMT(CompoundLiteralExpr , Expr)
-STMT(ExtVectorElementExpr , Expr)
-STMT(InitListExpr , Expr)
-STMT(DesignatedInitExpr , Expr)
-STMT(ImplicitValueInitExpr , Expr)
-STMT(VAArgExpr , Expr)
+EXPR(PredefinedExpr , Expr)
+EXPR(DeclRefExpr , Expr)
+EXPR(IntegerLiteral , Expr)
+EXPR(FloatingLiteral , Expr)
+EXPR(ImaginaryLiteral , Expr)
+EXPR(StringLiteral , Expr)
+EXPR(CharacterLiteral , Expr)
+EXPR(ParenExpr , Expr)
+EXPR(UnaryOperator , Expr)
+EXPR(SizeOfAlignOfExpr , Expr)
+EXPR(ArraySubscriptExpr , Expr)
+EXPR(CallExpr , Expr)
+EXPR(MemberExpr , Expr)
+EXPR(CastExpr , Expr)
+EXPR(BinaryOperator , Expr)
+EXPR(CompoundAssignOperator, BinaryOperator)
+EXPR(ConditionalOperator , Expr)
+EXPR(ImplicitCastExpr , CastExpr)
+EXPR(ExplicitCastExpr , CastExpr)
+EXPR(CStyleCastExpr , ExplicitCastExpr)
+EXPR(CompoundLiteralExpr , Expr)
+EXPR(ExtVectorElementExpr , Expr)
+EXPR(InitListExpr , Expr)
+EXPR(DesignatedInitExpr , Expr)
+EXPR(ImplicitValueInitExpr , Expr)
+EXPR(VAArgExpr , Expr)
// GNU Extensions.
-STMT(AddrLabelExpr , Expr)
-STMT(StmtExpr , Expr)
-STMT(TypesCompatibleExpr , Expr)
-STMT(ChooseExpr , Expr)
-STMT(GNUNullExpr , Expr)
+EXPR(AddrLabelExpr , Expr)
+EXPR(StmtExpr , Expr)
+EXPR(TypesCompatibleExpr , Expr)
+EXPR(ChooseExpr , Expr)
+EXPR(GNUNullExpr , Expr)
// C++ Expressions.
-STMT(CXXOperatorCallExpr , CallExpr)
-STMT(CXXMemberCallExpr , CallExpr)
-STMT(CXXNamedCastExpr , ExplicitCastExpr)
-STMT(CXXStaticCastExpr , CXXNamedCastExpr)
-STMT(CXXDynamicCastExpr , CXXNamedCastExpr)
-STMT(CXXReinterpretCastExpr , CXXNamedCastExpr)
-STMT(CXXConstCastExpr , CXXNamedCastExpr)
-STMT(CXXFunctionalCastExpr , ExplicitCastExpr)
-STMT(CXXTypeidExpr , Expr)
-STMT(CXXBoolLiteralExpr , Expr)
-STMT(CXXNullPtrLiteralExpr , Expr)
-STMT(CXXThisExpr , Expr)
-STMT(CXXThrowExpr , Expr)
-STMT(CXXDefaultArgExpr , Expr)
-STMT(CXXZeroInitValueExpr , Expr)
-STMT(CXXConditionDeclExpr , DeclRefExpr)
-STMT(CXXNewExpr , Expr)
-STMT(CXXDeleteExpr , Expr)
-STMT(UnresolvedFunctionNameExpr , Expr)
-STMT(UnaryTypeTraitExpr , Expr)
-STMT(QualifiedDeclRefExpr , DeclRefExpr)
-STMT(UnresolvedDeclRefExpr , Expr)
-STMT(CXXConstructExpr , Expr)
-STMT(CXXExprWithTemporaries , Expr)
-STMT(CXXTemporaryObjectExpr , CXXConstructExpr)
+EXPR(CXXOperatorCallExpr , CallExpr)
+EXPR(CXXMemberCallExpr , CallExpr)
+EXPR(CXXNamedCastExpr , ExplicitCastExpr)
+EXPR(CXXStaticCastExpr , CXXNamedCastExpr)
+EXPR(CXXDynamicCastExpr , CXXNamedCastExpr)
+EXPR(CXXReinterpretCastExpr , CXXNamedCastExpr)
+EXPR(CXXConstCastExpr , CXXNamedCastExpr)
+EXPR(CXXFunctionalCastExpr , ExplicitCastExpr)
+EXPR(CXXTypeidExpr , Expr)
+EXPR(CXXBoolLiteralExpr , Expr)
+EXPR(CXXNullPtrLiteralExpr , Expr)
+EXPR(CXXThisExpr , Expr)
+EXPR(CXXThrowExpr , Expr)
+EXPR(CXXDefaultArgExpr , Expr)
+EXPR(CXXZeroInitValueExpr , Expr)
+EXPR(CXXConditionDeclExpr , DeclRefExpr)
+EXPR(CXXNewExpr , Expr)
+EXPR(CXXDeleteExpr , Expr)
+EXPR(UnresolvedFunctionNameExpr , Expr)
+EXPR(UnaryTypeTraitExpr , Expr)
+EXPR(QualifiedDeclRefExpr , DeclRefExpr)
+EXPR(UnresolvedDeclRefExpr , Expr)
+EXPR(CXXConstructExpr , Expr)
+EXPR(CXXExprWithTemporaries , Expr)
+EXPR(CXXTemporaryObjectExpr , CXXConstructExpr)
// Obj-C Expressions.
-STMT(ObjCStringLiteral , Expr)
-STMT(ObjCEncodeExpr , Expr)
-STMT(ObjCMessageExpr , Expr)
-STMT(ObjCSelectorExpr , Expr)
-STMT(ObjCProtocolExpr , Expr)
-STMT(ObjCIvarRefExpr , Expr)
-STMT(ObjCPropertyRefExpr , Expr)
-STMT(ObjCKVCRefExpr , Expr)
-STMT(ObjCSuperExpr , Expr)
+EXPR(ObjCStringLiteral , Expr)
+EXPR(ObjCEncodeExpr , Expr)
+EXPR(ObjCMessageExpr , Expr)
+EXPR(ObjCSelectorExpr , Expr)
+EXPR(ObjCProtocolExpr , Expr)
+EXPR(ObjCIvarRefExpr , Expr)
+EXPR(ObjCPropertyRefExpr , Expr)
+EXPR(ObjCKVCRefExpr , Expr)
+EXPR(ObjCSuperExpr , Expr)
// Clang Extensions.
-STMT(ShuffleVectorExpr , Expr)
-STMT(BlockExpr , Expr)
-STMT(BlockDeclRefExpr , Expr)
+EXPR(ShuffleVectorExpr , Expr)
+EXPR(BlockExpr , Expr)
+EXPR(BlockDeclRefExpr , Expr)
LAST_EXPR(BlockDeclRefExpr)
#undef STMT
+#undef EXPR
#undef FIRST_STMT
#undef LAST_STMT
#undef FIRST_EXPR