38
38
#define CONTEXT_DECL (Id, Parent ) DECL(Id, Parent)
39
39
#endif
40
40
41
+ // / ABSTRACT_CONTEXT_DECL(Id, Parent)
42
+ // / Used for abstract Decls that are also DeclContexts.
43
+ // /
44
+ #ifndef ABSTRACT_CONTEXT_DECL
45
+ #define ABSTRACT_CONTEXT_DECL (Id, Parent ) ABSTRACT_DECL(Id, Parent)
46
+ #endif
47
+
41
48
// / ITERABLE_NONGENERIC_DECL(Id, Parent)
42
49
// / Used for Decls that are also IterableDeclContexts and DeclContexts. The
43
50
// / default behavior is to do the same as for CONTEXT_DECL. This combination
145
152
146
153
ABSTRACT_DECL (Value, Decl)
147
154
ABSTRACT_DECL(Type, ValueDecl)
148
- ABSTRACT_DECL (GenericType, TypeDecl)
149
- ABSTRACT_DECL (NominalType, GenericTypeDecl)
155
+ ABSTRACT_CONTEXT_DECL (GenericType, TypeDecl)
156
+ ABSTRACT_CONTEXT_DECL (NominalType, GenericTypeDecl)
150
157
NOMINAL_TYPE_DECL(Enum, NominalTypeDecl)
151
158
NOMINAL_TYPE_DECL(Struct, NominalTypeDecl)
152
159
NOMINAL_TYPE_DECL(Class, NominalTypeDecl)
@@ -165,7 +172,7 @@ ABSTRACT_DECL(Value, Decl)
165
172
VALUE_DECL(Param, VarDecl)
166
173
GENERIC_VALUE_DECL(Subscript, AbstractStorageDecl)
167
174
DECL_RANGE(AbstractStorage, Var, Subscript)
168
- ABSTRACT_DECL (AbstractFunction, ValueDecl)
175
+ ABSTRACT_CONTEXT_DECL (AbstractFunction, ValueDecl)
169
176
ABSTRACT_FUNCTION_DECL(Constructor, AbstractFunctionDecl)
170
177
ABSTRACT_FUNCTION_DECL(Destructor, AbstractFunctionDecl)
171
178
ABSTRACT_FUNCTION_DECL(Func, AbstractFunctionDecl)
@@ -208,6 +215,7 @@ LAST_DECL(MacroExpansion)
208
215
#undef ABSTRACT_FUNCTION_DECL
209
216
#undef VALUE_DECL
210
217
#undef DECL_RANGE
218
+ #undef ABSTRACT_CONTEXT_DECL
211
219
#undef ABSTRACT_DECL
212
220
#undef OPERATOR_DECL
213
221
#undef DECL
0 commit comments