Refactory: smarty.ui plugin.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / IAbstractSyntaxTreeVisitor.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler;
12
13 import net.sourceforge.phpdt.core.compiler.IProblem;
14 import net.sourceforge.phpdt.internal.compiler.ast.AND_AND_Expression;
15 import net.sourceforge.phpdt.internal.compiler.ast.AllocationExpression;
16 import net.sourceforge.phpdt.internal.compiler.ast.AnonymousLocalTypeDeclaration;
17 import net.sourceforge.phpdt.internal.compiler.ast.Argument;
18 import net.sourceforge.phpdt.internal.compiler.ast.ArrayAllocationExpression;
19 import net.sourceforge.phpdt.internal.compiler.ast.ArrayInitializer;
20 import net.sourceforge.phpdt.internal.compiler.ast.ArrayQualifiedTypeReference;
21 import net.sourceforge.phpdt.internal.compiler.ast.ArrayReference;
22 import net.sourceforge.phpdt.internal.compiler.ast.ArrayTypeReference;
23 import net.sourceforge.phpdt.internal.compiler.ast.AssertStatement;
24 import net.sourceforge.phpdt.internal.compiler.ast.Assignment;
25 import net.sourceforge.phpdt.internal.compiler.ast.BinaryExpression;
26 import net.sourceforge.phpdt.internal.compiler.ast.Block;
27 import net.sourceforge.phpdt.internal.compiler.ast.BreakStatement;
28 import net.sourceforge.phpdt.internal.compiler.ast.CaseStatement;
29 import net.sourceforge.phpdt.internal.compiler.ast.CastExpression;
30 import net.sourceforge.phpdt.internal.compiler.ast.Clinit;
31 import net.sourceforge.phpdt.internal.compiler.ast.CompilationUnitDeclaration;
32 import net.sourceforge.phpdt.internal.compiler.ast.CompoundAssignment;
33 import net.sourceforge.phpdt.internal.compiler.ast.ConditionalExpression;
34 import net.sourceforge.phpdt.internal.compiler.ast.ConstructorDeclaration;
35 import net.sourceforge.phpdt.internal.compiler.ast.ContinueStatement;
36 import net.sourceforge.phpdt.internal.compiler.ast.DefaultCase;
37 import net.sourceforge.phpdt.internal.compiler.ast.DoStatement;
38 import net.sourceforge.phpdt.internal.compiler.ast.DoubleLiteral;
39 import net.sourceforge.phpdt.internal.compiler.ast.EmptyStatement;
40 import net.sourceforge.phpdt.internal.compiler.ast.EqualExpression;
41 import net.sourceforge.phpdt.internal.compiler.ast.ExplicitConstructorCall;
42 import net.sourceforge.phpdt.internal.compiler.ast.ExtendedStringLiteral;
43 import net.sourceforge.phpdt.internal.compiler.ast.FalseLiteral;
44 import net.sourceforge.phpdt.internal.compiler.ast.FieldDeclaration;
45 import net.sourceforge.phpdt.internal.compiler.ast.FieldReference;
46 import net.sourceforge.phpdt.internal.compiler.ast.FloatLiteral;
47 import net.sourceforge.phpdt.internal.compiler.ast.ForStatement;
48 import net.sourceforge.phpdt.internal.compiler.ast.IfStatement;
49 import net.sourceforge.phpdt.internal.compiler.ast.ImportReference;
50 import net.sourceforge.phpdt.internal.compiler.ast.Initializer;
51 import net.sourceforge.phpdt.internal.compiler.ast.InstanceOfExpression;
52 import net.sourceforge.phpdt.internal.compiler.ast.IntLiteral;
53 import net.sourceforge.phpdt.internal.compiler.ast.LabeledStatement;
54 import net.sourceforge.phpdt.internal.compiler.ast.LocalDeclaration;
55 import net.sourceforge.phpdt.internal.compiler.ast.LocalTypeDeclaration;
56 import net.sourceforge.phpdt.internal.compiler.ast.LongLiteral;
57 import net.sourceforge.phpdt.internal.compiler.ast.MemberTypeDeclaration;
58 import net.sourceforge.phpdt.internal.compiler.ast.MessageSend;
59 import net.sourceforge.phpdt.internal.compiler.ast.MethodDeclaration;
60 import net.sourceforge.phpdt.internal.compiler.ast.NullLiteral;
61 import net.sourceforge.phpdt.internal.compiler.ast.OR_OR_Expression;
62 import net.sourceforge.phpdt.internal.compiler.ast.PostfixExpression;
63 import net.sourceforge.phpdt.internal.compiler.ast.PrefixExpression;
64 import net.sourceforge.phpdt.internal.compiler.ast.QualifiedAllocationExpression;
65 import net.sourceforge.phpdt.internal.compiler.ast.QualifiedNameReference;
66 import net.sourceforge.phpdt.internal.compiler.ast.QualifiedSuperReference;
67 import net.sourceforge.phpdt.internal.compiler.ast.QualifiedThisReference;
68 import net.sourceforge.phpdt.internal.compiler.ast.QualifiedTypeReference;
69 import net.sourceforge.phpdt.internal.compiler.ast.ReturnStatement;
70 import net.sourceforge.phpdt.internal.compiler.ast.SingleNameReference;
71 import net.sourceforge.phpdt.internal.compiler.ast.SingleTypeReference;
72 import net.sourceforge.phpdt.internal.compiler.ast.StringLiteral;
73 import net.sourceforge.phpdt.internal.compiler.ast.SuperReference;
74 import net.sourceforge.phpdt.internal.compiler.ast.SwitchStatement;
75 import net.sourceforge.phpdt.internal.compiler.ast.ThisReference;
76 import net.sourceforge.phpdt.internal.compiler.ast.ThrowStatement;
77 import net.sourceforge.phpdt.internal.compiler.ast.TrueLiteral;
78 import net.sourceforge.phpdt.internal.compiler.ast.TryStatement;
79 import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration;
80 import net.sourceforge.phpdt.internal.compiler.ast.UnaryExpression;
81 import net.sourceforge.phpdt.internal.compiler.ast.WhileStatement;
82 import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
83 import net.sourceforge.phpdt.internal.compiler.lookup.ClassScope;
84 import net.sourceforge.phpdt.internal.compiler.lookup.CompilationUnitScope;
85 import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope;
86
87 /**
88  * A visitor interface for interating through the parse tree.
89  */
90 public interface IAbstractSyntaxTreeVisitor {
91         void acceptProblem(IProblem problem);
92
93         void endVisit(AllocationExpression allocationExpression, BlockScope scope);
94
95         void endVisit(AND_AND_Expression and_and_Expression, BlockScope scope);
96
97         void endVisit(AnonymousLocalTypeDeclaration anonymousTypeDeclaration,
98                         BlockScope scope);
99
100         void endVisit(Argument argument, BlockScope scope);
101
102         void endVisit(ArrayAllocationExpression arrayAllocationExpression,
103                         BlockScope scope);
104
105         void endVisit(ArrayInitializer arrayInitializer, BlockScope scope);
106
107         void endVisit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
108                         BlockScope scope);
109
110         void endVisit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
111                         ClassScope scope);
112
113         void endVisit(ArrayReference arrayReference, BlockScope scope);
114
115         void endVisit(ArrayTypeReference arrayTypeReference, BlockScope scope);
116
117         void endVisit(ArrayTypeReference arrayTypeReference, ClassScope scope);
118
119         void endVisit(AssertStatement assertStatement, BlockScope scope);
120
121         void endVisit(Assignment assignment, BlockScope scope);
122
123         void endVisit(BinaryExpression binaryExpression, BlockScope scope);
124
125         void endVisit(Block block, BlockScope scope);
126
127         void endVisit(BreakStatement breakStatement, BlockScope scope);
128
129         void endVisit(CaseStatement caseStatement, BlockScope scope);
130
131         void endVisit(CastExpression castExpression, BlockScope scope);
132
133         // void endVisit(CharLiteral charLiteral, BlockScope scope);
134         // void endVisit(ClassLiteralAccess classLiteral, BlockScope scope);
135         void endVisit(Clinit clinit, ClassScope scope);
136
137         void endVisit(CompilationUnitDeclaration compilationUnitDeclaration,
138                         CompilationUnitScope scope);
139
140         void endVisit(CompoundAssignment compoundAssignment, BlockScope scope);
141
142         void endVisit(ConditionalExpression conditionalExpression, BlockScope scope);
143
144         void endVisit(ConstructorDeclaration constructorDeclaration,
145                         ClassScope scope);
146
147         void endVisit(ContinueStatement continueStatement, BlockScope scope);
148
149         void endVisit(DefaultCase defaultCaseStatement, BlockScope scope);
150
151         void endVisit(DoStatement doStatement, BlockScope scope);
152
153         void endVisit(DoubleLiteral doubleLiteral, BlockScope scope);
154
155         void endVisit(EqualExpression equalExpression, BlockScope scope);
156
157         void endVisit(EmptyStatement statement, BlockScope scope);
158
159         void endVisit(ExplicitConstructorCall explicitConstructor, BlockScope scope);
160
161         void endVisit(ExtendedStringLiteral extendedStringLiteral, BlockScope scope);
162
163         void endVisit(FalseLiteral falseLiteral, BlockScope scope);
164
165         void endVisit(FieldDeclaration fieldDeclaration, MethodScope scope);
166
167         void endVisit(FieldReference fieldReference, BlockScope scope);
168
169         void endVisit(FloatLiteral floatLiteral, BlockScope scope);
170
171         void endVisit(ForStatement forStatement, BlockScope scope);
172
173         void endVisit(IfStatement ifStatement, BlockScope scope);
174
175         void endVisit(ImportReference importRef, CompilationUnitScope scope);
176
177         void endVisit(Initializer initializer, MethodScope scope);
178
179         void endVisit(InstanceOfExpression instanceOfExpression, BlockScope scope);
180
181         void endVisit(IntLiteral intLiteral, BlockScope scope);
182
183         void endVisit(LabeledStatement labeledStatement, BlockScope scope);
184
185         void endVisit(LocalDeclaration localDeclaration, BlockScope scope);
186
187         void endVisit(LocalTypeDeclaration localTypeDeclaration, BlockScope scope);
188
189         void endVisit(LongLiteral longLiteral, BlockScope scope);
190
191         void endVisit(MemberTypeDeclaration memberTypeDeclaration, ClassScope scope);
192
193         void endVisit(MessageSend messageSend, BlockScope scope);
194
195         void endVisit(MethodDeclaration methodDeclaration, ClassScope scope);
196
197         void endVisit(NullLiteral nullLiteral, BlockScope scope);
198
199         void endVisit(OR_OR_Expression or_or_Expression, BlockScope scope);
200
201         void endVisit(PostfixExpression postfixExpression, BlockScope scope);
202
203         void endVisit(PrefixExpression prefixExpression, BlockScope scope);
204
205         void endVisit(QualifiedAllocationExpression qualifiedAllocationExpression,
206                         BlockScope scope);
207
208         void endVisit(QualifiedNameReference qualifiedNameReference,
209                         BlockScope scope);
210
211         void endVisit(QualifiedSuperReference qualifiedSuperReference,
212                         BlockScope scope);
213
214         void endVisit(QualifiedThisReference qualifiedThisReference,
215                         BlockScope scope);
216
217         void endVisit(QualifiedTypeReference qualifiedTypeReference,
218                         BlockScope scope);
219
220         void endVisit(QualifiedTypeReference qualifiedTypeReference,
221                         ClassScope scope);
222
223         void endVisit(ReturnStatement returnStatement, BlockScope scope);
224
225         void endVisit(SingleNameReference singleNameReference, BlockScope scope);
226
227         void endVisit(SingleTypeReference singleTypeReference, BlockScope scope);
228
229         void endVisit(SingleTypeReference singleTypeReference, ClassScope scope);
230
231         void endVisit(StringLiteral stringLiteral, BlockScope scope);
232
233         void endVisit(SuperReference superReference, BlockScope scope);
234
235         void endVisit(SwitchStatement switchStatement, BlockScope scope);
236
237         // void endVisit(SynchronizedStatement synchronizedStatement, BlockScope
238         // scope);
239         void endVisit(ThisReference thisReference, BlockScope scope);
240
241         void endVisit(ThrowStatement throwStatement, BlockScope scope);
242
243         void endVisit(TrueLiteral trueLiteral, BlockScope scope);
244
245         void endVisit(TryStatement tryStatement, BlockScope scope);
246
247         void endVisit(TypeDeclaration typeDeclaration, CompilationUnitScope scope);
248
249         void endVisit(UnaryExpression unaryExpression, BlockScope scope);
250
251         void endVisit(WhileStatement whileStatement, BlockScope scope);
252
253         boolean visit(AllocationExpression allocationExpression, BlockScope scope);
254
255         boolean visit(AND_AND_Expression and_and_Expression, BlockScope scope);
256
257         boolean visit(AnonymousLocalTypeDeclaration anonymousTypeDeclaration,
258                         BlockScope scope);
259
260         boolean visit(Argument argument, BlockScope scope);
261
262         boolean visit(ArrayAllocationExpression arrayAllocationExpression,
263                         BlockScope scope);
264
265         boolean visit(ArrayInitializer arrayInitializer, BlockScope scope);
266
267         boolean visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
268                         BlockScope scope);
269
270         boolean visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
271                         ClassScope scope);
272
273         boolean visit(ArrayReference arrayReference, BlockScope scope);
274
275         boolean visit(ArrayTypeReference arrayTypeReference, BlockScope scope);
276
277         boolean visit(ArrayTypeReference arrayTypeReference, ClassScope scope);
278
279         boolean visit(AssertStatement assertStatement, BlockScope scope);
280
281         boolean visit(Assignment assignment, BlockScope scope);
282
283         boolean visit(BinaryExpression binaryExpression, BlockScope scope);
284
285         boolean visit(Block block, BlockScope scope);
286
287         boolean visit(BreakStatement breakStatement, BlockScope scope);
288
289         boolean visit(CaseStatement caseStatement, BlockScope scope);
290
291         boolean visit(CastExpression castExpression, BlockScope scope);
292
293         // boolean visit(CharLiteral charLiteral, BlockScope scope);
294         // boolean visit(ClassLiteralAccess classLiteral, BlockScope scope);
295         boolean visit(Clinit clinit, ClassScope scope);
296
297         boolean visit(CompilationUnitDeclaration compilationUnitDeclaration,
298                         CompilationUnitScope scope);
299
300         boolean visit(CompoundAssignment compoundAssignment, BlockScope scope);
301
302         boolean visit(ConditionalExpression conditionalExpression, BlockScope scope);
303
304         boolean visit(ConstructorDeclaration constructorDeclaration,
305                         ClassScope scope);
306
307         boolean visit(ContinueStatement continueStatement, BlockScope scope);
308
309         boolean visit(DefaultCase defaultCaseStatement, BlockScope scope);
310
311         boolean visit(DoStatement doStatement, BlockScope scope);
312
313         boolean visit(DoubleLiteral doubleLiteral, BlockScope scope);
314
315         boolean visit(EqualExpression equalExpression, BlockScope scope);
316
317         boolean visit(EmptyStatement statement, BlockScope scope);
318
319         boolean visit(ExplicitConstructorCall explicitConstructor, BlockScope scope);
320
321         boolean visit(ExtendedStringLiteral extendedStringLiteral, BlockScope scope);
322
323         boolean visit(FalseLiteral falseLiteral, BlockScope scope);
324
325         boolean visit(FieldDeclaration fieldDeclaration, MethodScope scope);
326
327         boolean visit(FieldReference fieldReference, BlockScope scope);
328
329         boolean visit(FloatLiteral floatLiteral, BlockScope scope);
330
331         boolean visit(ForStatement forStatement, BlockScope scope);
332
333         boolean visit(IfStatement ifStatement, BlockScope scope);
334
335         boolean visit(ImportReference importRef, CompilationUnitScope scope);
336
337         boolean visit(Initializer initializer, MethodScope scope);
338
339         boolean visit(InstanceOfExpression instanceOfExpression, BlockScope scope);
340
341         boolean visit(IntLiteral intLiteral, BlockScope scope);
342
343         boolean visit(LabeledStatement labeledStatement, BlockScope scope);
344
345         boolean visit(LocalDeclaration localDeclaration, BlockScope scope);
346
347         boolean visit(LocalTypeDeclaration localTypeDeclaration, BlockScope scope);
348
349         boolean visit(LongLiteral longLiteral, BlockScope scope);
350
351         boolean visit(MemberTypeDeclaration memberTypeDeclaration, ClassScope scope);
352
353         boolean visit(MessageSend messageSend, BlockScope scope);
354
355         boolean visit(MethodDeclaration methodDeclaration, ClassScope scope);
356
357         boolean visit(NullLiteral nullLiteral, BlockScope scope);
358
359         boolean visit(OR_OR_Expression or_or_Expression, BlockScope scope);
360
361         boolean visit(PostfixExpression postfixExpression, BlockScope scope);
362
363         boolean visit(PrefixExpression prefixExpression, BlockScope scope);
364
365         boolean visit(QualifiedAllocationExpression qualifiedAllocationExpression,
366                         BlockScope scope);
367
368         boolean visit(QualifiedNameReference qualifiedNameReference,
369                         BlockScope scope);
370
371         boolean visit(QualifiedSuperReference qualifiedSuperReference,
372                         BlockScope scope);
373
374         boolean visit(QualifiedThisReference qualifiedThisReference,
375                         BlockScope scope);
376
377         boolean visit(QualifiedTypeReference qualifiedTypeReference,
378                         BlockScope scope);
379
380         boolean visit(QualifiedTypeReference qualifiedTypeReference,
381                         ClassScope scope);
382
383         boolean visit(ReturnStatement returnStatement, BlockScope scope);
384
385         boolean visit(SingleNameReference singleNameReference, BlockScope scope);
386
387         boolean visit(SingleTypeReference singleTypeReference, BlockScope scope);
388
389         boolean visit(SingleTypeReference singleTypeReference, ClassScope scope);
390
391         boolean visit(StringLiteral stringLiteral, BlockScope scope);
392
393         boolean visit(SuperReference superReference, BlockScope scope);
394
395         boolean visit(SwitchStatement switchStatement, BlockScope scope);
396
397         // boolean visit(SynchronizedStatement synchronizedStatement, BlockScope
398         // scope);
399         boolean visit(ThisReference thisReference, BlockScope scope);
400
401         boolean visit(ThrowStatement throwStatement, BlockScope scope);
402
403         boolean visit(TrueLiteral trueLiteral, BlockScope scope);
404
405         boolean visit(TryStatement tryStatement, BlockScope scope);
406
407         boolean visit(TypeDeclaration typeDeclaration, CompilationUnitScope scope);
408
409         boolean visit(UnaryExpression unaryExpression, BlockScope scope);
410
411         boolean visit(WhileStatement whileStatement, BlockScope scope);
412 }