ASTVisitor.h 20 KB
Newer Older
1
/**************************************************************************
con's avatar
con committed
2
3
4
**
** This file is part of Qt Creator
**
con's avatar
con committed
5
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
con's avatar
con committed
6
**
hjk's avatar
hjk committed
7
** Contact: Nokia Corporation (info@qt.nokia.com)
con's avatar
con committed
8
**
9
**
10
** GNU Lesser General Public License Usage
11
**
hjk's avatar
hjk committed
12
13
14
15
16
17
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18
**
con's avatar
con committed
19
** In addition, as a special exception, Nokia gives you certain additional
hjk's avatar
hjk committed
20
** rights. These rights are described in the Nokia Qt LGPL Exception
con's avatar
con committed
21
22
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
hjk's avatar
hjk committed
23
24
25
26
27
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
con's avatar
con committed
28
** If you have questions regarding the use of this file, please contact
Tobias Hunger's avatar
Tobias Hunger committed
29
** Nokia at info@qt.nokia.com.
con's avatar
con committed
30
**
31
**************************************************************************/
con's avatar
con committed
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#ifndef CPLUSPLUS_ASTVISITOR_H
#define CPLUSPLUS_ASTVISITOR_H

#include "CPlusPlusForwardDeclarations.h"
#include "ASTfwd.h"

Roberto Raggi's avatar
Roberto Raggi committed
58
59

namespace CPlusPlus {
con's avatar
con committed
60
61
62
63
64
65
66

class CPLUSPLUS_EXPORT ASTVisitor
{
    ASTVisitor(const ASTVisitor &other);
    void operator =(const ASTVisitor &other);

public:
Roberto Raggi's avatar
Roberto Raggi committed
67
    ASTVisitor(TranslationUnit *unit);
con's avatar
con committed
68
69
70
    virtual ~ASTVisitor();

    TranslationUnit *translationUnit() const;
Roberto Raggi's avatar
Roberto Raggi committed
71
    void setTranslationUnit(TranslationUnit *translationUnit);
con's avatar
con committed
72

Roberto Raggi's avatar
Roberto Raggi committed
73
    Control *control() const;
74
    unsigned tokenCount() const;
75
    const Token &tokenAt(unsigned index) const;
con's avatar
con committed
76
77
    int tokenKind(unsigned index) const;
    const char *spell(unsigned index) const;
Roberto Raggi's avatar
Roberto Raggi committed
78
79
80
81
    const Identifier *identifier(unsigned index) const;
    const Literal *literal(unsigned index) const;
    const NumericLiteral *numericLiteral(unsigned index) const;
    const StringLiteral *stringLiteral(unsigned index) const;
con's avatar
con committed
82

83
84
85
    void getPosition(unsigned offset,
                     unsigned *line,
                     unsigned *column = 0,
Roberto Raggi's avatar
Roberto Raggi committed
86
                     const StringLiteral **fileName = 0) const;
87

con's avatar
con committed
88
89
90
    void getTokenPosition(unsigned index,
                          unsigned *line,
                          unsigned *column = 0,
Roberto Raggi's avatar
Roberto Raggi committed
91
                          const StringLiteral **fileName = 0) const;
con's avatar
con committed
92

93
94
95
    void getTokenStartPosition(unsigned index, unsigned *line, unsigned *column) const;
    void getTokenEndPosition(unsigned index, unsigned *line, unsigned *column) const;

con's avatar
con committed
96
97
    void accept(AST *ast);

98
99
100
101
102
103
104
    template <typename _Tp>
    void accept(List<_Tp> *it)
    {
        for (; it; it = it->next)
            accept(it->value);
    }

con's avatar
con committed
105
106
107
108
    virtual bool preVisit(AST *) { return true; }
    virtual void postVisit(AST *) {}

    virtual bool visit(AccessDeclarationAST *) { return true; }
109
110
    virtual bool visit(QtObjectTagAST *) { return true; }
    virtual bool visit(QtPrivateSlotAST *) { return true; }
111
112
113
    virtual bool visit(QtPropertyDeclarationAST *) { return true; }
    virtual bool visit(QtEnumDeclarationAST *) { return true; }
    virtual bool visit(QtFlagsDeclarationAST *) { return true; }
con's avatar
con committed
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
    virtual bool visit(ArrayAccessAST *) { return true; }
    virtual bool visit(ArrayDeclaratorAST *) { return true; }
    virtual bool visit(ArrayInitializerAST *) { return true; }
    virtual bool visit(AsmDefinitionAST *) { return true; }
    virtual bool visit(AttributeSpecifierAST *) { return true; }
    virtual bool visit(AttributeAST *) { return true; }
    virtual bool visit(BaseSpecifierAST *) { return true; }
    virtual bool visit(BinaryExpressionAST *) { return true; }
    virtual bool visit(BoolLiteralAST *) { return true; }
    virtual bool visit(BreakStatementAST *) { return true; }
    virtual bool visit(CallAST *) { return true; }
    virtual bool visit(CaseStatementAST *) { return true; }
    virtual bool visit(CastExpressionAST *) { return true; }
    virtual bool visit(CatchClauseAST *) { return true; }
    virtual bool visit(ClassSpecifierAST *) { return true; }
129
    virtual bool visit(CompoundExpressionAST *) { return true; }
130
    virtual bool visit(CompoundLiteralAST *) { return true; }
con's avatar
con committed
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
    virtual bool visit(CompoundStatementAST *) { return true; }
    virtual bool visit(ConditionAST *) { return true; }
    virtual bool visit(ConditionalExpressionAST *) { return true; }
    virtual bool visit(ContinueStatementAST *) { return true; }
    virtual bool visit(ConversionFunctionIdAST *) { return true; }
    virtual bool visit(CppCastExpressionAST *) { return true; }
    virtual bool visit(CtorInitializerAST *) { return true; }
    virtual bool visit(DeclaratorAST *) { return true; }
    virtual bool visit(DeclarationStatementAST *) { return true; }
    virtual bool visit(DeclaratorIdAST *) { return true; }
    virtual bool visit(DeleteExpressionAST *) { return true; }
    virtual bool visit(DestructorNameAST *) { return true; }
    virtual bool visit(DoStatementAST *) { return true; }
    virtual bool visit(ElaboratedTypeSpecifierAST *) { return true; }
    virtual bool visit(EmptyDeclarationAST *) { return true; }
    virtual bool visit(EnumSpecifierAST *) { return true; }
    virtual bool visit(EnumeratorAST *) { return true; }
    virtual bool visit(ExceptionDeclarationAST *) { return true; }
    virtual bool visit(ExceptionSpecificationAST *) { return true; }
    virtual bool visit(ExpressionOrDeclarationStatementAST *) { return true; }
    virtual bool visit(ExpressionStatementAST *) { return true; }
152
    virtual bool visit(ForeachStatementAST *) { return true; }
con's avatar
con committed
153
154
155
156
    virtual bool visit(ForStatementAST *) { return true; }
    virtual bool visit(FunctionDeclaratorAST *) { return true; }
    virtual bool visit(FunctionDefinitionAST *) { return true; }
    virtual bool visit(GotoStatementAST *) { return true; }
Roberto Raggi's avatar
Roberto Raggi committed
157
    virtual bool visit(IdExpressionAST *) { return true; }
con's avatar
con committed
158
159
160
161
162
163
164
165
166
167
168
169
    virtual bool visit(IfStatementAST *) { return true; }
    virtual bool visit(LabeledStatementAST *) { return true; }
    virtual bool visit(LinkageBodyAST *) { return true; }
    virtual bool visit(LinkageSpecificationAST *) { return true; }
    virtual bool visit(MemInitializerAST *) { return true; }
    virtual bool visit(MemberAccessAST *) { return true; }
    virtual bool visit(NamedTypeSpecifierAST *) { return true; }
    virtual bool visit(NamespaceAST *) { return true; }
    virtual bool visit(NamespaceAliasDefinitionAST *) { return true; }
    virtual bool visit(NestedDeclaratorAST *) { return true; }
    virtual bool visit(NestedExpressionAST *) { return true; }
    virtual bool visit(NestedNameSpecifierAST *) { return true; }
170
171
    virtual bool visit(NewPlacementAST *) { return true; }
    virtual bool visit(NewArrayDeclaratorAST *) { return true; }
con's avatar
con committed
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
    virtual bool visit(NewExpressionAST *) { return true; }
    virtual bool visit(NewInitializerAST *) { return true; }
    virtual bool visit(NewTypeIdAST *) { return true; }
    virtual bool visit(NumericLiteralAST *) { return true; }
    virtual bool visit(OperatorAST *) { return true; }
    virtual bool visit(OperatorFunctionIdAST *) { return true; }
    virtual bool visit(ParameterDeclarationAST *) { return true; }
    virtual bool visit(ParameterDeclarationClauseAST *) { return true; }
    virtual bool visit(PointerAST *) { return true; }
    virtual bool visit(PointerToMemberAST *) { return true; }
    virtual bool visit(PostIncrDecrAST *) { return true; }
    virtual bool visit(QualifiedNameAST *) { return true; }
    virtual bool visit(ReferenceAST *) { return true; }
    virtual bool visit(ReturnStatementAST *) { return true; }
    virtual bool visit(SimpleDeclarationAST *) { return true; }
    virtual bool visit(SimpleNameAST *) { return true; }
    virtual bool visit(SimpleSpecifierAST *) { return true; }
    virtual bool visit(SizeofExpressionAST *) { return true; }
    virtual bool visit(StringLiteralAST *) { return true; }
    virtual bool visit(SwitchStatementAST *) { return true; }
    virtual bool visit(TemplateDeclarationAST *) { return true; }
    virtual bool visit(TemplateIdAST *) { return true; }
    virtual bool visit(TemplateTypeParameterAST *) { return true; }
    virtual bool visit(ThisExpressionAST *) { return true; }
    virtual bool visit(ThrowExpressionAST *) { return true; }
    virtual bool visit(TranslationUnitAST *) { return true; }
    virtual bool visit(TryBlockStatementAST *) { return true; }
    virtual bool visit(TypeConstructorCallAST *) { return true; }
    virtual bool visit(TypeIdAST *) { return true; }
    virtual bool visit(TypeidExpressionAST *) { return true; }
    virtual bool visit(TypeofSpecifierAST *) { return true; }
    virtual bool visit(TypenameCallExpressionAST *) { return true; }
    virtual bool visit(TypenameTypeParameterAST *) { return true; }
    virtual bool visit(UnaryExpressionAST *) { return true; }
    virtual bool visit(UsingAST *) { return true; }
    virtual bool visit(UsingDirectiveAST *) { return true; }
    virtual bool visit(WhileStatementAST *) { return true; }
    virtual bool visit(QtMethodAST *) { return true; }
210
    virtual bool visit(QtMemberDeclarationAST *) { return true; }
211
    virtual bool visit(QtPropertyDeclarationItemAST *) { return true; }
212
213
    virtual bool visit(QtInterfacesDeclarationAST *) { return true; }
    virtual bool visit(QtInterfaceNameAST *) { return true; }
214

215
216
217
218
219
220
221
    // C++0x
    virtual bool visit(LambdaExpressionAST *) { return true; }
    virtual bool visit(LambdaIntroducerAST *) { return true; }
    virtual bool visit(LambdaCaptureAST *) { return true; }
    virtual bool visit(LambdaDeclaratorAST *) { return true; }
    virtual bool visit(CaptureAST *) { return true; }
    virtual bool visit(TrailingReturnTypeAST *) { return true; }
Roberto Raggi's avatar
Roberto Raggi committed
222
    virtual bool visit(BracedInitializerAST *) { return true; }
223

224
225
    // ObjC++
    virtual bool visit(ObjCClassDeclarationAST *) { return true; }
Erik Verbruggen's avatar
Erik Verbruggen committed
226
    virtual bool visit(ObjCClassForwardDeclarationAST *) { return true; }
Erik Verbruggen's avatar
Erik Verbruggen committed
227
    virtual bool visit(ObjCProtocolDeclarationAST *) { return true; }
Erik Verbruggen's avatar
Erik Verbruggen committed
228
    virtual bool visit(ObjCProtocolForwardDeclarationAST *) { return true; }
Erik Verbruggen's avatar
Erik Verbruggen committed
229
    virtual bool visit(ObjCProtocolRefsAST *) { return true; }
230
    virtual bool visit(ObjCSelectorAST *) { return true; }
Erik Verbruggen's avatar
Erik Verbruggen committed
231
    virtual bool visit(ObjCMessageExpressionAST *) { return true; }
232
    virtual bool visit(ObjCMessageArgumentAST *) { return true; }
233
    virtual bool visit(ObjCProtocolExpressionAST *) { return true; }
234
235
    virtual bool visit(ObjCTypeNameAST *) { return true; }
    virtual bool visit(ObjCEncodeExpressionAST *) { return true; }
236
237
    virtual bool visit(ObjCSelectorArgumentAST *) { return true; }
    virtual bool visit(ObjCSelectorExpressionAST *) { return true; }
238
239
    virtual bool visit(ObjCInstanceVariablesDeclarationAST *) { return true; }
    virtual bool visit(ObjCVisibilityDeclarationAST *) { return true; }
240
    virtual bool visit(ObjCPropertyAttributeAST *) { return true; }
241
    virtual bool visit(ObjCPropertyDeclarationAST *) { return true; }
242
    virtual bool visit(ObjCMethodPrototypeAST *) { return true; }
243
    virtual bool visit(ObjCMethodDeclarationAST *) { return true; }
244
    virtual bool visit(ObjCMessageArgumentDeclarationAST *) { return true; }
Erik Verbruggen's avatar
Erik Verbruggen committed
245
246
247
248
    virtual bool visit(ObjCSynthesizedPropertyAST *) { return true; }
    virtual bool visit(ObjCSynthesizedPropertiesDeclarationAST *) { return true; }
    virtual bool visit(ObjCDynamicPropertiesDeclarationAST *) { return true; }
    virtual bool visit(ObjCFastEnumerationAST *) { return true; }
249
    virtual bool visit(ObjCSynchronizedStatementAST *) { return true; }
250

251
    virtual void endVisit(AccessDeclarationAST *) { }
252
253
    virtual void endVisit(QtObjectTagAST *) {}
    virtual void endVisit(QtPrivateSlotAST *) {}
254
255
256
    virtual void endVisit(QtPropertyDeclarationAST *) { }
    virtual void endVisit(QtEnumDeclarationAST *) { }
    virtual void endVisit(QtFlagsDeclarationAST *) { }
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
    virtual void endVisit(ArrayAccessAST *) { }
    virtual void endVisit(ArrayDeclaratorAST *) { }
    virtual void endVisit(ArrayInitializerAST *) { }
    virtual void endVisit(AsmDefinitionAST *) { }
    virtual void endVisit(AttributeSpecifierAST *) { }
    virtual void endVisit(AttributeAST *) { }
    virtual void endVisit(BaseSpecifierAST *) { }
    virtual void endVisit(BinaryExpressionAST *) { }
    virtual void endVisit(BoolLiteralAST *) { }
    virtual void endVisit(BreakStatementAST *) { }
    virtual void endVisit(CallAST *) { }
    virtual void endVisit(CaseStatementAST *) { }
    virtual void endVisit(CastExpressionAST *) { }
    virtual void endVisit(CatchClauseAST *) { }
    virtual void endVisit(ClassSpecifierAST *) { }
272
    virtual void endVisit(CompoundExpressionAST *) { }
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
    virtual void endVisit(CompoundLiteralAST *) { }
    virtual void endVisit(CompoundStatementAST *) { }
    virtual void endVisit(ConditionAST *) { }
    virtual void endVisit(ConditionalExpressionAST *) { }
    virtual void endVisit(ContinueStatementAST *) { }
    virtual void endVisit(ConversionFunctionIdAST *) { }
    virtual void endVisit(CppCastExpressionAST *) { }
    virtual void endVisit(CtorInitializerAST *) { }
    virtual void endVisit(DeclaratorAST *) { }
    virtual void endVisit(DeclarationStatementAST *) { }
    virtual void endVisit(DeclaratorIdAST *) { }
    virtual void endVisit(DeleteExpressionAST *) { }
    virtual void endVisit(DestructorNameAST *) { }
    virtual void endVisit(DoStatementAST *) { }
    virtual void endVisit(ElaboratedTypeSpecifierAST *) { }
    virtual void endVisit(EmptyDeclarationAST *) { }
    virtual void endVisit(EnumSpecifierAST *) { }
    virtual void endVisit(EnumeratorAST *) { }
    virtual void endVisit(ExceptionDeclarationAST *) { }
    virtual void endVisit(ExceptionSpecificationAST *) { }
    virtual void endVisit(ExpressionOrDeclarationStatementAST *) { }
    virtual void endVisit(ExpressionStatementAST *) { }
295
    virtual void endVisit(ForeachStatementAST *) { }
296
297
298
299
    virtual void endVisit(ForStatementAST *) { }
    virtual void endVisit(FunctionDeclaratorAST *) { }
    virtual void endVisit(FunctionDefinitionAST *) { }
    virtual void endVisit(GotoStatementAST *) { }
Roberto Raggi's avatar
Roberto Raggi committed
300
    virtual void endVisit(IdExpressionAST *) { }
301
302
303
304
305
306
307
308
309
310
311
312
    virtual void endVisit(IfStatementAST *) { }
    virtual void endVisit(LabeledStatementAST *) { }
    virtual void endVisit(LinkageBodyAST *) { }
    virtual void endVisit(LinkageSpecificationAST *) { }
    virtual void endVisit(MemInitializerAST *) { }
    virtual void endVisit(MemberAccessAST *) { }
    virtual void endVisit(NamedTypeSpecifierAST *) { }
    virtual void endVisit(NamespaceAST *) { }
    virtual void endVisit(NamespaceAliasDefinitionAST *) { }
    virtual void endVisit(NestedDeclaratorAST *) { }
    virtual void endVisit(NestedExpressionAST *) { }
    virtual void endVisit(NestedNameSpecifierAST *) { }
313
314
    virtual void endVisit(NewPlacementAST *) { }
    virtual void endVisit(NewArrayDeclaratorAST *) { }
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
    virtual void endVisit(NewExpressionAST *) { }
    virtual void endVisit(NewInitializerAST *) { }
    virtual void endVisit(NewTypeIdAST *) { }
    virtual void endVisit(NumericLiteralAST *) { }
    virtual void endVisit(OperatorAST *) { }
    virtual void endVisit(OperatorFunctionIdAST *) { }
    virtual void endVisit(ParameterDeclarationAST *) { }
    virtual void endVisit(ParameterDeclarationClauseAST *) { }
    virtual void endVisit(PointerAST *) { }
    virtual void endVisit(PointerToMemberAST *) { }
    virtual void endVisit(PostIncrDecrAST *) { }
    virtual void endVisit(QualifiedNameAST *) { }
    virtual void endVisit(ReferenceAST *) { }
    virtual void endVisit(ReturnStatementAST *) { }
    virtual void endVisit(SimpleDeclarationAST *) { }
    virtual void endVisit(SimpleNameAST *) { }
    virtual void endVisit(SimpleSpecifierAST *) { }
    virtual void endVisit(SizeofExpressionAST *) { }
    virtual void endVisit(StringLiteralAST *) { }
    virtual void endVisit(SwitchStatementAST *) { }
    virtual void endVisit(TemplateDeclarationAST *) { }
    virtual void endVisit(TemplateIdAST *) { }
    virtual void endVisit(TemplateTypeParameterAST *) { }
    virtual void endVisit(ThisExpressionAST *) { }
    virtual void endVisit(ThrowExpressionAST *) { }
    virtual void endVisit(TranslationUnitAST *) { }
    virtual void endVisit(TryBlockStatementAST *) { }
    virtual void endVisit(TypeConstructorCallAST *) { }
    virtual void endVisit(TypeIdAST *) { }
    virtual void endVisit(TypeidExpressionAST *) { }
    virtual void endVisit(TypeofSpecifierAST *) { }
    virtual void endVisit(TypenameCallExpressionAST *) { }
    virtual void endVisit(TypenameTypeParameterAST *) { }
    virtual void endVisit(UnaryExpressionAST *) { }
    virtual void endVisit(UsingAST *) { }
    virtual void endVisit(UsingDirectiveAST *) { }
    virtual void endVisit(WhileStatementAST *) { }
    virtual void endVisit(QtMethodAST *) { }
353
    virtual void endVisit(QtMemberDeclarationAST *) { }
354
    virtual void endVisit(QtPropertyDeclarationItemAST *) { }
355
356
    virtual void endVisit(QtInterfacesDeclarationAST *) { }
    virtual void endVisit(QtInterfaceNameAST *) { }
357

Roberto Raggi's avatar
Roberto Raggi committed
358
    // C++0x
359
360
361
362
363
364
    virtual void endVisit(LambdaExpressionAST *) { }
    virtual void endVisit(LambdaIntroducerAST *) { }
    virtual void endVisit(LambdaCaptureAST *) { }
    virtual void endVisit(LambdaDeclaratorAST *) { }
    virtual void endVisit(CaptureAST *) { }
    virtual void endVisit(TrailingReturnTypeAST *) { }
Roberto Raggi's avatar
Roberto Raggi committed
365
    virtual void endVisit(BracedInitializerAST *) { }
366

367
368
    // ObjC++
    virtual void endVisit(ObjCClassDeclarationAST *) { }
Erik Verbruggen's avatar
Erik Verbruggen committed
369
    virtual void endVisit(ObjCClassForwardDeclarationAST *) { }
Erik Verbruggen's avatar
Erik Verbruggen committed
370
    virtual void endVisit(ObjCProtocolDeclarationAST *) { }
Erik Verbruggen's avatar
Erik Verbruggen committed
371
    virtual void endVisit(ObjCProtocolForwardDeclarationAST *) { }
Erik Verbruggen's avatar
Erik Verbruggen committed
372
    virtual void endVisit(ObjCProtocolRefsAST *) { }
373
    virtual void endVisit(ObjCSelectorAST *) { }
Erik Verbruggen's avatar
Erik Verbruggen committed
374
    virtual void endVisit(ObjCMessageExpressionAST *) { }
375
    virtual void endVisit(ObjCMessageArgumentAST *) { }
376
    virtual void endVisit(ObjCProtocolExpressionAST *) { }
377
378
    virtual void endVisit(ObjCTypeNameAST *) { }
    virtual void endVisit(ObjCEncodeExpressionAST *) { }
379
380
    virtual void endVisit(ObjCSelectorArgumentAST *) { }
    virtual void endVisit(ObjCSelectorExpressionAST *) { }
381
382
    virtual void endVisit(ObjCInstanceVariablesDeclarationAST *) { }
    virtual void endVisit(ObjCVisibilityDeclarationAST *) { }
383
    virtual void endVisit(ObjCPropertyAttributeAST *) { }
384
    virtual void endVisit(ObjCPropertyDeclarationAST *) { }
385
    virtual void endVisit(ObjCMethodPrototypeAST *) { }
386
    virtual void endVisit(ObjCMethodDeclarationAST *) { }
387
    virtual void endVisit(ObjCMessageArgumentDeclarationAST *) { }
Erik Verbruggen's avatar
Erik Verbruggen committed
388
389
390
391
    virtual void endVisit(ObjCSynthesizedPropertyAST *) { }
    virtual void endVisit(ObjCSynthesizedPropertiesDeclarationAST *) { }
    virtual void endVisit(ObjCDynamicPropertiesDeclarationAST *) { }
    virtual void endVisit(ObjCFastEnumerationAST *) { }
392
    virtual void endVisit(ObjCSynchronizedStatementAST *) { }
393

con's avatar
con committed
394
private:
Roberto Raggi's avatar
Roberto Raggi committed
395
    TranslationUnit *_translationUnit;
con's avatar
con committed
396
397
};

398
} // namespace CPlusPlus
Roberto Raggi's avatar
Roberto Raggi committed
399

con's avatar
con committed
400
401

#endif // CPLUSPLUS_ASTVISITOR_H