1
2
3
4
5
6 #ifndef SNGCM_AST_VISITOR_INCLUDED
7 #define SNGCM_AST_VISITOR_INCLUDED
8 #include <sngcm/ast/AstApi.hpp>
9
10 namespace sngcm { namespace ast {
11
12 class BoolNode;
13 class SByteNode;
14 class ByteNode;
15 class ShortNode;
16 class UShortNode;
17 class IntNode;
18 class UIntNode;
19 class LongNode;
20 class ULongNode;
21 class FloatNode;
22 class DoubleNode;
23 class CharNode;
24 class WCharNode;
25 class UCharNode;
26 class VoidNode;
27
28 class BooleanLiteralNode;
29 class SByteLiteralNode;
30 class ByteLiteralNode;
31 class ShortLiteralNode;
32 class UShortLiteralNode;
33 class IntLiteralNode;
34 class UIntLiteralNode;
35 class LongLiteralNode;
36 class ULongLiteralNode;
37 class FloatLiteralNode;
38 class DoubleLiteralNode;
39 class CharLiteralNode;
40 class WCharLiteralNode;
41 class UCharLiteralNode;
42 class StringLiteralNode;
43 class WStringLiteralNode;
44 class UStringLiteralNode;
45 class NullLiteralNode;
46 class ArrayLiteralNode;
47 class StructuredLiteralNode;
48 class UuidLiteralNode;
49
50 class CompileUnitNode;
51 class NamespaceNode;
52 class AliasNode;
53 class NamespaceImportNode;
54 class IdentifierNode;
55 class CursorIdNode;
56 class TemplateIdNode;
57 class FunctionNode;
58 class ClassNode;
59 class ThisInitializerNode;
60 class BaseInitializerNode;
61 class MemberInitializerNode;
62 class StaticConstructorNode;
63 class ConstructorNode;
64 class DestructorNode;
65 class MemberFunctionNode;
66 class ConversionFunctionNode;
67 class MemberVariableNode;
68 class InterfaceNode;
69 class DelegateNode;
70 class ClassDelegateNode;
71
72 class ParenthesizedConstraintNode;
73 class DisjunctiveConstraintNode;
74 class ConjunctiveConstraintNode;
75 class WhereConstraintNode;
76 class PredicateConstraintNode;
77 class IsConstraintNode;
78 class MultiParamConstraintNode;
79 class TypeNameConstraintNode;
80 class ConstructorConstraintNode;
81 class DestructorConstraintNode;
82 class MemberFunctionConstraintNode;
83 class FunctionConstraintNode;
84 class AxiomStatementNode;
85 class AxiomNode;
86 class ConceptIdNode;
87 class ConceptNode;
88
89 class SameConstraintNode;
90 class DerivedConstraintNode;
91 class ConvertibleConstraintNode;
92 class ExplicitlyConvertibleConstraintNode;
93 class CommonConstraintNode;
94 class NonreferenceTypeConstraintNode;
95
96 class LabelNode;
97 class LabeledStatementNode;
98 class CompoundStatementNode;
99 class ReturnStatementNode;
100 class IfStatementNode;
101 class WhileStatementNode;
102 class DoStatementNode;
103 class ForStatementNode;
104 class BreakStatementNode;
105 class ContinueStatementNode;
106 class GotoStatementNode;
107 class ConstructionStatementNode;
108 class DeleteStatementNode;
109 class DestroyStatementNode;
110 class AssignmentStatementNode;
111 class ExpressionStatementNode;
112 class EmptyStatementNode;
113 class RangeForStatementNode;
114 class SwitchStatementNode;
115 class CaseStatementNode;
116 class DefaultStatementNode;
117 class GotoCaseStatementNode;
118 class GotoDefaultStatementNode;
119 class ThrowStatementNode;
120 class CatchNode;
121 class TryStatementNode;
122 class AssertStatementNode;
123 class ConditionalCompilationPartNode;
124 class ConditionalCompilationDisjunctionNode;
125 class ConditionalCompilationConjunctionNode;
126 class ConditionalCompilationNotNode;
127 class ConditionalCompilationPrimaryNode;
128 class ParenthesizedConditionalCompilationExpressionNode;
129 class ConditionalCompilationStatementNode;
130
131 class ConstantNode;
132 class EnumTypeNode;
133 class EnumConstantNode;
134 class ParameterNode;
135 class TemplateParameterNode;
136 class TypedefNode;
137
138 class ConstNode;
139 class LValueRefNode;
140 class RValueRefNode;
141 class PointerNode;
142 class ArrayNode;
143
144 class DotNode;
145 class ArrowNode;
146 class EquivalenceNode;
147 class ImplicationNode;
148 class DisjunctionNode;
149 class ConjunctionNode;
150 class BitOrNode;
151 class BitXorNode;
152 class BitAndNode;
153 class EqualNode;
154 class NotEqualNode;
155 class LessNode;
156 class GreaterNode;
157 class LessOrEqualNode;
158 class GreaterOrEqualNode;
159 class ShiftLeftNode;
160 class ShiftRightNode;
161 class AddNode;
162 class SubNode;
163 class MulNode;
164 class DivNode;
165 class RemNode;
166 class NotNode;
167 class UnaryPlusNode;
168 class UnaryMinusNode;
169 class PrefixIncrementNode;
170 class PrefixDecrementNode;
171 class DerefNode;
172 class AddrOfNode;
173 class ComplementNode;
174 class IsNode;
175 class AsNode;
176 class IndexingNode;
177 class InvokeNode;
178 class PostfixIncrementNode;
179 class PostfixDecrementNode;
180 class SizeOfNode;
181 class TypeNameNode;
182 class TypeIdNode;
183 class CastNode;
184 class ConstructNode;
185 class NewNode;
186 class ThisNode;
187 class BaseNode;
188 class ParenthesizedExpressionNode;
189 class GlobalVariableNode;
190 class Attribute;
191 class Attributes;
192 class CommentNode;
193
194 class Visitor
195 {
196 public:
197 virtual ~Visitor();
198 virtual void Visit(BoolNode& boolNode) {}
199 virtual void Visit(SByteNode& sbyteNode) {}
200 virtual void Visit(ByteNode& byteNode) {}
201 virtual void Visit(ShortNode& shortNode) {}
202 virtual void Visit(UShortNode& ushortNode) {}
203 virtual void Visit(IntNode& intNode) {}
204 virtual void Visit(UIntNode& uintNode) {}
205 virtual void Visit(LongNode& longNode) {}
206 virtual void Visit(ULongNode& ulongNode) {}
207 virtual void Visit(FloatNode& floatNode) {}
208 virtual void Visit(DoubleNode& doubleNode) {}
209 virtual void Visit(CharNode& charNode) {}
210 virtual void Visit(WCharNode& wcharNode) {}
211 virtual void Visit(UCharNode& ucharNode) {}
212 virtual void Visit(VoidNode& voidNode) {}
213
214 virtual void Visit(BooleanLiteralNode& booleanLiteralNode) {}
215 virtual void Visit(SByteLiteralNode& sbyteLiteralNode) {}
216 virtual void Visit(ByteLiteralNode& byteLiteralNode) {}
217 virtual void Visit(ShortLiteralNode& shortLiteralNode) {}
218 virtual void Visit(UShortLiteralNode& ushortLiteralNode) {}
219 virtual void Visit(IntLiteralNode& intLiteralNode) {}
220 virtual void Visit(UIntLiteralNode& uintLiteralNode) {}
221 virtual void Visit(LongLiteralNode& longLiteralNode) {}
222 virtual void Visit(ULongLiteralNode& ulongLiteralNode) {}
223 virtual void Visit(FloatLiteralNode& floatLiteralNode) {}
224 virtual void Visit(DoubleLiteralNode& doubleLiteralNode) {}
225 virtual void Visit(CharLiteralNode& charLiteralNode) {}
226 virtual void Visit(WCharLiteralNode& wcharLiteralNode) {}
227 virtual void Visit(UCharLiteralNode& ucharLiteralNode) {}
228 virtual void Visit(StringLiteralNode& stringLiteralNode) {}
229 virtual void Visit(WStringLiteralNode& wstringLiteralNode) {}
230 virtual void Visit(UStringLiteralNode& ustringLiteralNode) {}
231 virtual void Visit(NullLiteralNode& nullLiteralNode) {}
232 virtual void Visit(ArrayLiteralNode& arrayLiteralNode) {}
233 virtual void Visit(StructuredLiteralNode& structuredLiteralNode) {}
234 virtual void Visit(UuidLiteralNode& uuidLiteralNode) {}
235
236 virtual void Visit(CompileUnitNode& compileUnitNode) {}
237 virtual void Visit(NamespaceNode& namespaceNode) {}
238 virtual void Visit(AliasNode& aliasNode) {}
239 virtual void Visit(NamespaceImportNode& namespaceImportNode) {}
240 virtual void Visit(IdentifierNode& identifierNode) {}
241 virtual void Visit(CursorIdNode& cursorIdNode) {}
242 virtual void Visit(TemplateIdNode& templateIdNode) {}
243 virtual void Visit(FunctionNode& functionNode) {}
244 virtual void Visit(ClassNode& classNode) {}
245 virtual void Visit(ThisInitializerNode& thisInitializerNode) {}
246 virtual void Visit(BaseInitializerNode& baseInitializerNode) {}
247 virtual void Visit(MemberInitializerNode& memberInitializerNode) {}
248 virtual void Visit(StaticConstructorNode& staticConstructorNode) {}
249 virtual void Visit(ConstructorNode& constructorNode) {}
250 virtual void Visit(DestructorNode& destructorNode) {}
251 virtual void Visit(MemberFunctionNode& memberFunctionNode) {}
252 virtual void Visit(ConversionFunctionNode& conversionFunctionNode) {}
253 virtual void Visit(MemberVariableNode& memberVariableNode) {}
254 virtual void Visit(InterfaceNode& interfaceNode) {}
255 virtual void Visit(DelegateNode& delegateNode) {}
256 virtual void Visit(ClassDelegateNode& classDelegateNode) {}
257
258 virtual void Visit(ParenthesizedConstraintNode& parenthesizedConstraintNode) {}
259 virtual void Visit(DisjunctiveConstraintNode& disjunctiveConstraintNode) {}
260 virtual void Visit(ConjunctiveConstraintNode& conjunctiveConstraintNode) {}
261 virtual void Visit(WhereConstraintNode& whereConstraintNode) {}
262 virtual void Visit(PredicateConstraintNode& predicateConstraintNode) {}
263 virtual void Visit(IsConstraintNode& isConstraintNode) {}
264 virtual void Visit(MultiParamConstraintNode& multiParamConstraintNode) {}
265 virtual void Visit(TypeNameConstraintNode& typeNameConstraintNode) {}
266 virtual void Visit(ConstructorConstraintNode& constructorConstraintNode) {}
267 virtual void Visit(DestructorConstraintNode& destructorConstraintNode) {}
268 virtual void Visit(MemberFunctionConstraintNode& memberFunctionConstraintNode) {}
269 virtual void Visit(FunctionConstraintNode& functionConstraintNode) {}
270 virtual void Visit(AxiomStatementNode& axiomStatementNode) {}
271 virtual void Visit(AxiomNode& axiomNode) {}
272 virtual void Visit(ConceptIdNode& conceptIdNode) {}
273 virtual void Visit(ConceptNode& conceptNode) {}
274
275 virtual void Visit(SameConstraintNode& sameConstraintNode) {}
276 virtual void Visit(DerivedConstraintNode& derivedConstraintNode) {}
277 virtual void Visit(ConvertibleConstraintNode& convertibleConstraintNode) {}
278 virtual void Visit(ExplicitlyConvertibleConstraintNode& explicitlyConvertibleConstraintNode) {}
279 virtual void Visit(CommonConstraintNode& commonConstraintNode) {}
280 virtual void Visit(NonreferenceTypeConstraintNode& nonreferenceTypeConstraintNode) {}
281
282 virtual void Visit(LabelNode& labelNode) {}
283 virtual void Visit(LabeledStatementNode& labeledStatementNode) {}
284 virtual void Visit(CompoundStatementNode& compoundStatementNode) {}
285 virtual void Visit(ReturnStatementNode& returnStatementNode) {}
286 virtual void Visit(IfStatementNode& ifStatementNode) {}
287 virtual void Visit(WhileStatementNode& whileStatementNode) {}
288 virtual void Visit(DoStatementNode& doStatementNode) {}
289 virtual void Visit(ForStatementNode& forStatementNode) {}
290 virtual void Visit(BreakStatementNode& breakStatementNode) {}
291 virtual void Visit(ContinueStatementNode& continueStatementNode) {}
292 virtual void Visit(GotoStatementNode& gotoStatementNode) {}
293 virtual void Visit(ConstructionStatementNode& constructionStatementNode) {}
294 virtual void Visit(DeleteStatementNode& deleteStatementNode) {}
295 virtual void Visit(DestroyStatementNode& destroyStatementNode) {}
296 virtual void Visit(AssignmentStatementNode& assignmentStatementNode) {}
297 virtual void Visit(ExpressionStatementNode& expressionStatementNode) {}
298 virtual void Visit(EmptyStatementNode& emptyStatementNode) {}
299 virtual void Visit(RangeForStatementNode& rangeForStatementNode) {}
300 virtual void Visit(SwitchStatementNode& switchStatementNode) {}
301 virtual void Visit(CaseStatementNode& caseStatementNode) {}
302 virtual void Visit(DefaultStatementNode& defaultStatementNode) {}
303 virtual void Visit(GotoCaseStatementNode& gotoCaseStatementNode) {}
304 virtual void Visit(GotoDefaultStatementNode& gotoDefaultStatementNode) {}
305 virtual void Visit(ThrowStatementNode& throwStatementNode) {}
306 virtual void Visit(TryStatementNode& tryStatementNode) {}
307 virtual void Visit(CatchNode& catchNode) {}
308 virtual void Visit(AssertStatementNode& assertStatementNode) {}
309 virtual void Visit(ConditionalCompilationPartNode& conditionalCompilationPartNode) {}
310 virtual void Visit(ConditionalCompilationDisjunctionNode& conditionalCompilationDisjunctionNode) {}
311 virtual void Visit(ConditionalCompilationConjunctionNode& conditionalCompilationConjunctionNode) {}
312 virtual void Visit(ConditionalCompilationNotNode& conditionalCompilationNotNode) {}
313 virtual void Visit(ConditionalCompilationPrimaryNode& conditionalCompilationPrimaryNode) {}
314 virtual void Visit(ParenthesizedConditionalCompilationExpressionNode& parenthesizeCondCompExprNode) {}
315 virtual void Visit(ConditionalCompilationStatementNode& conditionalCompilationStatementNode) {}
316
317 virtual void Visit(TypedefNode& typedefNode) {}
318 virtual void Visit(ConstantNode& constantNode) {}
319 virtual void Visit(EnumTypeNode& enumTypeNode) {}
320 virtual void Visit(EnumConstantNode& enumConstantNode) {}
321 virtual void Visit(ParameterNode& parameterNode) {}
322 virtual void Visit(TemplateParameterNode& templateParameterNode) {}
323
324 virtual void Visit(ConstNode& constNode) {}
325 virtual void Visit(LValueRefNode& lvalueRefNode) {}
326 virtual void Visit(RValueRefNode& rvalueRefNode) {}
327 virtual void Visit(PointerNode& pointerNode) {}
328 virtual void Visit(ArrayNode& arrayNode) {}
329
330 virtual void Visit(DotNode& dotNode) {}
331 virtual void Visit(ArrowNode& arrowNode) {}
332 virtual void Visit(EquivalenceNode& equivalenceNode) {}
333 virtual void Visit(ImplicationNode& implicationNode) {}
334 virtual void Visit(DisjunctionNode& disjunctionNode) {}
335 virtual void Visit(ConjunctionNode& conjunctionNode) {}
336 virtual void Visit(BitOrNode& bitOrNode) {}
337 virtual void Visit(BitXorNode& bitXorNode) {}
338 virtual void Visit(BitAndNode& bitAndNode) {}
339 virtual void Visit(EqualNode& equalNode) {}
340 virtual void Visit(NotEqualNode& notEqualNode) {}
341 virtual void Visit(LessNode& lessNode) {}
342 virtual void Visit(GreaterNode& greaterNode) {}
343 virtual void Visit(LessOrEqualNode& lessOrEqualNode) {}
344 virtual void Visit(GreaterOrEqualNode& greaterOrEqualNode) {}
345 virtual void Visit(ShiftLeftNode& shiftLeftNode) {}
346 virtual void Visit(ShiftRightNode& shiftRightNode) {}
347 virtual void Visit(AddNode& addNode) {}
348 virtual void Visit(SubNode& subNode) {}
349 virtual void Visit(MulNode& mulNode) {}
350 virtual void Visit(DivNode& divNode) {}
351 virtual void Visit(RemNode& remNode) {}
352 virtual void Visit(NotNode& notNode) {}
353 virtual void Visit(UnaryPlusNode& unaryPlusNode) {}
354 virtual void Visit(UnaryMinusNode& unaryMinusNode) {}
355 virtual void Visit(PrefixIncrementNode& prefixIncrementNode) {}
356 virtual void Visit(PrefixDecrementNode& prefixDecrementNode) {}
357 virtual void Visit(DerefNode& derefNode) {}
358 virtual void Visit(AddrOfNode& addrOfNode) {}
359 virtual void Visit(ComplementNode& complementNode) {}
360 virtual void Visit(IsNode& isNode) {}
361 virtual void Visit(AsNode& asNode) {}
362 virtual void Visit(IndexingNode& indexingNode) {}
363 virtual void Visit(InvokeNode& invokeNode) {}
364 virtual void Visit(PostfixIncrementNode& postfixIncrementNode) {}
365 virtual void Visit(PostfixDecrementNode& postfixDecrementNode) {}
366 virtual void Visit(SizeOfNode& sizeOfNode) {}
367 virtual void Visit(TypeNameNode& typeNameNode) {}
368 virtual void Visit(TypeIdNode& typeIdNode) {}
369 virtual void Visit(CastNode& castNode) {}
370 virtual void Visit(ConstructNode& constructNode) {}
371 virtual void Visit(NewNode& newNode) {}
372 virtual void Visit(ThisNode& thisNode) {}
373 virtual void Visit(BaseNode& baseNode) {}
374 virtual void Visit(ParenthesizedExpressionNode& parenthesizedExpressionNode) {}
375 virtual void Visit(GlobalVariableNode& globalVariableNode) {}
376
377 virtual void Visit(Attribute& attribute) {}
378 virtual void Visit(Attributes& attributes) {}
379
380 virtual void Visit(CommentNode& commentNode) {}
381 };
382
383 } }
384
385 #endif // SNGCM_AST_VISITOR_INCLUDED