1
2
3
4
5
6 #ifndef SNGCPP_AST_VISITOR_INCLUDED
7 #define SNGCPP_AST_VISITOR_INCLUDED
8 #include <sngcpp/ast/AstApi.hpp>
9
10 namespace sngcpp { namespace ast {
11
12 class BaseClassSpecifierNode;
13 class BaseClassSpecifierSequenceNode;
14 class ForwardClassDeclarationNode;
15 class ElaborateClassNameNode;
16 class ClassNode;
17 class MemberAccessDeclarationNode;
18 class MemberDeclarationNode;
19 class SpecialMemberFunctionNode;
20 class CtorInitializerNode;
21 class MemberInitializerNode;
22 class MemberInitializerSequenceNode;
23 class SourceFileNode;
24 class SourceFileSequenceNode;
25 class SimpleDeclarationNode;
26 class AliasDeclarationNode;
27 class UsingDirectiveNode;
28 class UsingDeclarationNode;
29 class TypedefNode;
30 class DeclarationSequenceNode;
31 class LinkageSpecificationNode;
32 class IdDeclaratorNode;
33 class ArrayDeclaratorNode;
34 class FunctionDeclaratorNode;
35 class FunctionPtrIdNode;
36 class MemberFunctionPtrIdNode;
37 class InitDeclaratorNode;
38 class AssignmentInitializerNode;
39 class ExpressionListInitializerNode;
40 class ExpressionInitializerNode;
41 class BracedInitializerListNode;
42 class EnumTypeNode;
43 class EnumeratorNode;
44 class EnumeratorSequenceNode;
45 class ExpressionSequenceNode;
46 class CommaExpressionNode;
47 class AssignmentExpressionNode;
48 class ConditionalExpressionNode;
49 class ThrowExpressionNode;
50 class LogicalOrExpressionNode;
51 class LogicalAndExpressionNode;
52 class InclusiveOrExpressionNode;
53 class ExclusiveOrExpressionNode;
54 class AndExpressionNode;
55 class EqualityExpressionNode;
56 class RelationalExpressionNode;
57 class ShiftExpressionNode;
58 class AdditiveExpressionNode;
59 class MultiplicativeExpressionNode;
60 class PMExpressionNode;
61 class CastExpressionNode;
62 class UnaryExpressionNode;
63 class NewExpressionNode;
64 class DeleteExpressionNode;
65 class SubscriptExpressionNode;
66 class InvokeExpressionNode;
67 class DotNode;
68 class ArrowNode;
69 class PostfixIncNode;
70 class PostfixDecNode;
71 class CppCastExpressionNode;
72 class TypeIdExpressionNode;
73 class ThisNode;
74 class ParenthesizedExprNode;
75 class LambdaExpressionNode;
76 class CaptureSequenceNode;
77 class AssignCaptureNode;
78 class RefCaptureNode;
79 class ThisCaptureNode;
80 class IdentifierCaptureNode;
81 class IdentifierNode;
82 class OperatorFunctionIdNode;
83 class ConversionFunctionIdNode;
84 class DtorIdNode;
85 class NestedIdNode;
86 class ParameterNode;
87 class ParameterSequenceNode;
88 class FunctionNode;
89 class FloatingLiteralNode;
90 class IntegerLiteralNode;
91 class CharacterLiteralNode;
92 class StringLiteralNode;
93 class BooleanLiteralNode;
94 class NullPtrLiteralNode;
95 class NamespaceNode;
96 class SimpleTypeNode;
97 class LabeledStatementNode;
98 class CaseStatementNode;
99 class DefaultStatementNode;
100 class ExpressionStatementNode;
101 class CompoundStatementNode;
102 class StatementSequenceNode;
103 class IfStatementNode;
104 class SwitchStatementNode;
105 class WhileStatementNode;
106 class DoStatementNode;
107 class RangeForStatementNode;
108 class ForStatementNode;
109 class BreakStatementNode;
110 class ContinueStatementNode;
111 class ReturnStatementNode;
112 class GotoStatementNode;
113 class DeclarationStatementNode;
114 class TryStatementNode;
115 class HandlerNode;
116 class HandlerSequenceNode;
117 class CatchAllNode;
118 class TypeParameterNode;
119 class TemplateParameterSequenceNode;
120 class TemplateDeclarationNode;
121 class TemplateArgumentSequenceNode;
122 class TemplateIdNode;
123 class TemplateArgumentNode;
124 class ExplicitInstantiationNode;
125 class ExplicitSpecializationNode;
126 class ConstNode;
127 class VolatileNode;
128 class PointerNode;
129 class RValueRefNode;
130 class LValueRefNode;
131
132 class Visitor
133 {
134 public:
135 virtual ~Visitor();
136 virtual void Visit(BaseClassSpecifierNode& baseClassSpecifierNode) {}
137 virtual void Visit(BaseClassSpecifierSequenceNode& baseClassSpecifierSequenceNode) {}
138 virtual void Visit(ForwardClassDeclarationNode& forwardClassDeclarationNode) {}
139 virtual void Visit(ElaborateClassNameNode& elaborateClassNameNode) {}
140 virtual void Visit(ClassNode& classNode) {}
141 virtual void Visit(MemberAccessDeclarationNode& memberAccessDeclarationNode) {}
142 virtual void Visit(MemberDeclarationNode& memberDeclarationNode) {}
143 virtual void Visit(SpecialMemberFunctionNode& specialMemberFunctionNode) {}
144 virtual void Visit(CtorInitializerNode& ctorInitializerNode) {}
145 virtual void Visit(MemberInitializerNode& memberInitializerNode) {}
146 virtual void Visit(MemberInitializerSequenceNode& memberInitializerSequenceNode) {}
147 virtual void Visit(SourceFileNode& sourceFileNode) {}
148 virtual void Visit(SourceFileSequenceNode& sourceFileSequenceNode) {}
149 virtual void Visit(SimpleDeclarationNode& simpleDeclarationNode) {}
150 virtual void Visit(AliasDeclarationNode& aliasDeclarationNode) {}
151 virtual void Visit(UsingDirectiveNode& usingDirectiveNode) {}
152 virtual void Visit(UsingDeclarationNode& usingDeclarationNode) {}
153 virtual void Visit(TypedefNode& typedefNode) {}
154 virtual void Visit(DeclarationSequenceNode& declarationSequenceNode) {}
155 virtual void Visit(LinkageSpecificationNode& linkageSpecificationNode) {}
156 virtual void Visit(IdDeclaratorNode& idDeclaratorNode) {}
157 virtual void Visit(ArrayDeclaratorNode& arrayDeclaratorNode) {}
158 virtual void Visit(FunctionDeclaratorNode& functionDeclaratorNode) {}
159 virtual void Visit(FunctionPtrIdNode& functionPtrIdNode) {}
160 virtual void Visit(MemberFunctionPtrIdNode& memberFunctionPtrIdNode) {}
161 virtual void Visit(InitDeclaratorNode& initDeclaratorNode) {}
162 virtual void Visit(AssignmentInitializerNode& assignmentInitializerNode) {}
163 virtual void Visit(ExpressionListInitializerNode& expressionListInitializerNode) {}
164 virtual void Visit(ExpressionInitializerNode& expressionInitializerNode) {}
165 virtual void Visit(BracedInitializerListNode& bracedInitializerListNode) {}
166 virtual void Visit(EnumTypeNode& enumTypeNode) {}
167 virtual void Visit(EnumeratorNode& enumeratorNode) {}
168 virtual void Visit(EnumeratorSequenceNode& enumeratorSequenceNode) {}
169 virtual void Visit(ExpressionSequenceNode& expressionSequenceNode) {}
170 virtual void Visit(CommaExpressionNode& commaExpressionNode) {}
171 virtual void Visit(AssignmentExpressionNode& assignmentExpressionNode) {}
172 virtual void Visit(ConditionalExpressionNode& conditionalExpressionNode) {}
173 virtual void Visit(ThrowExpressionNode& throwExpressionNode) {}
174 virtual void Visit(LogicalOrExpressionNode& logicalOrExpressionNode) {}
175 virtual void Visit(LogicalAndExpressionNode& logicalAndExpressionNode) {}
176 virtual void Visit(InclusiveOrExpressionNode& inclusiveOrExpressionNode) {}
177 virtual void Visit(ExclusiveOrExpressionNode& exclusiveOrExpressionNode) {}
178 virtual void Visit(AndExpressionNode& andExpressionNode) {}
179 virtual void Visit(EqualityExpressionNode& equalityExpressionNode) {}
180 virtual void Visit(RelationalExpressionNode& relationalExpressionNode) {}
181 virtual void Visit(ShiftExpressionNode& shiftExpressionNode) {}
182 virtual void Visit(AdditiveExpressionNode& additiveExpressionNode) {}
183 virtual void Visit(MultiplicativeExpressionNode& multiplicativeExpressionNode) {}
184 virtual void Visit(PMExpressionNode& pmExpressionNode) {}
185 virtual void Visit(CastExpressionNode& castExpressionNode) {}
186 virtual void Visit(UnaryExpressionNode& unaryExpressionNode) {}
187 virtual void Visit(NewExpressionNode& newExpressionNode) {}
188 virtual void Visit(DeleteExpressionNode& deleteExpressionNode) {}
189 virtual void Visit(SubscriptExpressionNode& subscriptExpressionNode) {}
190 virtual void Visit(InvokeExpressionNode& invokeExpressionNode) {}
191 virtual void Visit(DotNode& dotNode) {}
192 virtual void Visit(ArrowNode& arrowNode) {}
193 virtual void Visit(PostfixIncNode& postfixIncNode) {}
194 virtual void Visit(PostfixDecNode& postfixDecNode) {}
195 virtual void Visit(CppCastExpressionNode& cppCastExpressionNode) {}
196 virtual void Visit(TypeIdExpressionNode& typeIdExpressionNode) {}
197 virtual void Visit(ThisNode& thisNode) {}
198 virtual void Visit(ParenthesizedExprNode& parenthesizedExprNode) {}
199 virtual void Visit(LambdaExpressionNode& lambdaExpressionNode) {}
200 virtual void Visit(CaptureSequenceNode& captureSequenceNode) {}
201 virtual void Visit(AssignCaptureNode& assignCaptureNode) {}
202 virtual void Visit(RefCaptureNode& refCaptureNode) {}
203 virtual void Visit(ThisCaptureNode& thisCaptureNode) {}
204 virtual void Visit(IdentifierCaptureNode& identifierCaptureNode) {}
205 virtual void Visit(IdentifierNode& identifierNode) {}
206 virtual void Visit(OperatorFunctionIdNode& operatorFunctionIdNode) {}
207 virtual void Visit(ConversionFunctionIdNode& conversionFunctionIdNode) {}
208 virtual void Visit(DtorIdNode& dDtorIdNode) {}
209 virtual void Visit(NestedIdNode& nestedIdNode) {}
210 virtual void Visit(ParameterNode& parameterNode) {}
211 virtual void Visit(ParameterSequenceNode& parameterSequenceNode) {}
212 virtual void Visit(FunctionNode& functionNode) {}
213 virtual void Visit(FloatingLiteralNode& floatingLiteralNode) {}
214 virtual void Visit(IntegerLiteralNode& integerLiteralNode) {}
215 virtual void Visit(CharacterLiteralNode& characterLiteralNode) {}
216 virtual void Visit(StringLiteralNode& stringLiteralNode) {}
217 virtual void Visit(BooleanLiteralNode& booleanLiteralNode) {}
218 virtual void Visit(NullPtrLiteralNode& nullPtrLiteralNode) {}
219 virtual void Visit(NamespaceNode& namespaceNode) {}
220 virtual void Visit(SimpleTypeNode& simpleTypeNode) {}
221 virtual void Visit(LabeledStatementNode& labeledStatementNode) {}
222 virtual void Visit(CaseStatementNode& caseStatementNode) {}
223 virtual void Visit(DefaultStatementNode& defaultStatementNode) {}
224 virtual void Visit(ExpressionStatementNode& expressionStatementNode) {}
225 virtual void Visit(CompoundStatementNode& compoundStatementNode) {}
226 virtual void Visit(StatementSequenceNode& statementSequenceNode) {}
227 virtual void Visit(IfStatementNode& ifStatementNode) {}
228 virtual void Visit(SwitchStatementNode& switchStatementNode) {}
229 virtual void Visit(WhileStatementNode& whileStatementNode) {}
230 virtual void Visit(DoStatementNode& doStatementNode) {}
231 virtual void Visit(RangeForStatementNode& rangeForStatementNode) {}
232 virtual void Visit(ForStatementNode& forStatementNode) {}
233 virtual void Visit(BreakStatementNode& breakStatementNode) {}
234 virtual void Visit(ContinueStatementNode& continueStatementNode) {}
235 virtual void Visit(ReturnStatementNode& returnStatementNode) {}
236 virtual void Visit(GotoStatementNode& gotoStatementNode) {}
237 virtual void Visit(DeclarationStatementNode& declarationStatementNode) {}
238 virtual void Visit(TryStatementNode& tryStatementNode) {}
239 virtual void Visit(HandlerNode& handlerNode) {}
240 virtual void Visit(HandlerSequenceNode& handlerSequenceNode) {}
241 virtual void Visit(CatchAllNode& catchAllNode) {}
242 virtual void Visit(TypeParameterNode& typeParameterNode) {}
243 virtual void Visit(TemplateParameterSequenceNode& templateParameterSequenceNode) {}
244 virtual void Visit(TemplateDeclarationNode& templateDeclarationNode) {}
245 virtual void Visit(TemplateArgumentSequenceNode& templateArgumentSequenceNode) {}
246 virtual void Visit(TemplateIdNode& templateIdNode) {}
247 virtual void Visit(TemplateArgumentNode& templateArgumentNode) {}
248 virtual void Visit(ExplicitInstantiationNode& explicitInstantiationNode) {}
249 virtual void Visit(ExplicitSpecializationNode& explicitSpecializationNode) {}
250 virtual void Visit(ConstNode& constNode) {}
251 virtual void Visit(VolatileNode& volatileNode) {}
252 virtual void Visit(PointerNode& pointerNode) {}
253 virtual void Visit(RValueRefNode& rValueRefNode) {}
254 virtual void Visit(LValueRefNode& lValueRefNode) {}
255 };
256
257 } }
258
259 #endif // SNGCPP_AST_VISITOR_INCLUDED