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