source: src/Common/PassVisitor.impl.h @ 7b15d7a

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 7b15d7a was 13932f14, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

Added the new PassVisitor? to simplify visiting all the nodes

  • Property mode set to 100644
File size: 9.1 KB
Line 
1#pragma once
2
3#define VISIT_BODY( node )    \
4        call_previsit( node );  \
5        Visitor::visit( node ); \
6        call_postvisit( node ); \
7
8
9template< typename pass_type >
10void PassVisitor< pass_type>::visit( ObjectDecl * node ) { 
11        VISIT_BODY( node ); 
12}
13
14template< typename pass_type >
15void PassVisitor< pass_type>::visit( FunctionDecl * node ) { 
16        VISIT_BODY( node ); 
17}
18
19template< typename pass_type >
20void PassVisitor< pass_type>::visit( StructDecl * node ) { 
21        VISIT_BODY( node ); 
22}
23
24template< typename pass_type >
25void PassVisitor< pass_type>::visit( UnionDecl * node ) { 
26        VISIT_BODY( node ); 
27}
28
29template< typename pass_type >
30void PassVisitor< pass_type>::visit( EnumDecl * node ) { 
31        VISIT_BODY( node ); 
32}
33
34template< typename pass_type >
35void PassVisitor< pass_type>::visit( TraitDecl * node ) { 
36        VISIT_BODY( node ); 
37}
38
39template< typename pass_type >
40void PassVisitor< pass_type>::visit( TypeDecl * node ) { 
41        VISIT_BODY( node ); 
42}
43
44template< typename pass_type >
45void PassVisitor< pass_type>::visit( TypedefDecl * node ) { 
46        VISIT_BODY( node ); 
47}
48
49template< typename pass_type >
50void PassVisitor< pass_type>::visit( AsmDecl * node ) { 
51        VISIT_BODY( node ); 
52}
53
54template< typename pass_type >
55void PassVisitor< pass_type>::visit( CompoundStmt * node ) { 
56        VISIT_BODY( node ); 
57}
58
59template< typename pass_type >
60void PassVisitor< pass_type>::visit( ExprStmt * node ) { 
61        VISIT_BODY( node ); 
62}
63
64template< typename pass_type >
65void PassVisitor< pass_type>::visit( AsmStmt * node ) { 
66        VISIT_BODY( node ); 
67}
68
69template< typename pass_type >
70void PassVisitor< pass_type>::visit( IfStmt * node ) { 
71        VISIT_BODY( node ); 
72}
73
74template< typename pass_type >
75void PassVisitor< pass_type>::visit( WhileStmt * node ) { 
76        VISIT_BODY( node ); 
77}
78
79template< typename pass_type >
80void PassVisitor< pass_type>::visit( ForStmt * node ) { 
81        VISIT_BODY( node ); 
82}
83
84template< typename pass_type >
85void PassVisitor< pass_type>::visit( SwitchStmt * node ) { 
86        VISIT_BODY( node ); 
87}
88
89template< typename pass_type >
90void PassVisitor< pass_type>::visit( CaseStmt * node ) { 
91        VISIT_BODY( node ); 
92}
93
94template< typename pass_type >
95void PassVisitor< pass_type>::visit( BranchStmt * node ) { 
96        VISIT_BODY( node ); 
97}
98
99template< typename pass_type >
100void PassVisitor< pass_type>::visit( ReturnStmt * node ) { 
101        VISIT_BODY( node ); 
102}
103
104template< typename pass_type >
105void PassVisitor< pass_type>::visit( TryStmt * node ) { 
106        VISIT_BODY( node ); 
107}
108
109template< typename pass_type >
110void PassVisitor< pass_type>::visit( CatchStmt * node ) { 
111        VISIT_BODY( node ); 
112}
113
114template< typename pass_type >
115void PassVisitor< pass_type>::visit( FinallyStmt * node ) { 
116        VISIT_BODY( node ); 
117}
118
119template< typename pass_type >
120void PassVisitor< pass_type>::visit( NullStmt * node ) { 
121        VISIT_BODY( node ); 
122}
123
124template< typename pass_type >
125void PassVisitor< pass_type>::visit( DeclStmt * node ) { 
126        VISIT_BODY( node ); 
127}
128
129template< typename pass_type >
130void PassVisitor< pass_type>::visit( ImplicitCtorDtorStmt * node ) { 
131        VISIT_BODY( node ); 
132}
133
134template< typename pass_type >
135void PassVisitor< pass_type>::visit( ApplicationExpr * node ) { 
136        VISIT_BODY( node ); 
137}
138
139template< typename pass_type >
140void PassVisitor< pass_type>::visit( UntypedExpr * node ) { 
141        VISIT_BODY( node ); 
142}
143
144template< typename pass_type >
145void PassVisitor< pass_type>::visit( NameExpr * node ) { 
146        VISIT_BODY( node ); 
147}
148
149template< typename pass_type >
150void PassVisitor< pass_type>::visit( CastExpr * node ) { 
151        VISIT_BODY( node ); 
152}
153
154template< typename pass_type >
155void PassVisitor< pass_type>::visit( AddressExpr * node ) { 
156        VISIT_BODY( node ); 
157}
158
159template< typename pass_type >
160void PassVisitor< pass_type>::visit( LabelAddressExpr * node ) { 
161        VISIT_BODY( node ); 
162}
163
164template< typename pass_type >
165void PassVisitor< pass_type>::visit( UntypedMemberExpr * node ) { 
166        VISIT_BODY( node ); 
167}
168
169template< typename pass_type >
170void PassVisitor< pass_type>::visit( MemberExpr * node ) { 
171        VISIT_BODY( node ); 
172}
173
174template< typename pass_type >
175void PassVisitor< pass_type>::visit( VariableExpr * node ) { 
176        VISIT_BODY( node ); 
177}
178
179template< typename pass_type >
180void PassVisitor< pass_type>::visit( ConstantExpr * node ) { 
181        VISIT_BODY( node ); 
182}
183
184template< typename pass_type >
185void PassVisitor< pass_type>::visit( SizeofExpr * node ) { 
186        VISIT_BODY( node ); 
187}
188
189template< typename pass_type >
190void PassVisitor< pass_type>::visit( AlignofExpr * node ) { 
191        VISIT_BODY( node ); 
192}
193
194template< typename pass_type >
195void PassVisitor< pass_type>::visit( UntypedOffsetofExpr * node ) { 
196        VISIT_BODY( node ); 
197}
198
199template< typename pass_type >
200void PassVisitor< pass_type>::visit( OffsetofExpr * node ) { 
201        VISIT_BODY( node ); 
202}
203
204template< typename pass_type >
205void PassVisitor< pass_type>::visit( OffsetPackExpr * node ) { 
206        VISIT_BODY( node ); 
207}
208
209template< typename pass_type >
210void PassVisitor< pass_type>::visit( AttrExpr * node ) { 
211        VISIT_BODY( node ); 
212}
213
214template< typename pass_type >
215void PassVisitor< pass_type>::visit( LogicalExpr * node ) { 
216        VISIT_BODY( node ); 
217}
218
219template< typename pass_type >
220void PassVisitor< pass_type>::visit( ConditionalExpr * node ) { 
221        VISIT_BODY( node ); 
222}
223
224template< typename pass_type >
225void PassVisitor< pass_type>::visit( CommaExpr * node ) { 
226        VISIT_BODY( node ); 
227}
228
229template< typename pass_type >
230void PassVisitor< pass_type>::visit( TypeExpr * node ) { 
231        VISIT_BODY( node ); 
232}
233
234template< typename pass_type >
235void PassVisitor< pass_type>::visit( AsmExpr * node ) { 
236        VISIT_BODY( node ); 
237}
238
239template< typename pass_type >
240void PassVisitor< pass_type>::visit( ImplicitCopyCtorExpr * node ) { 
241        VISIT_BODY( node ); 
242}
243
244template< typename pass_type >
245void PassVisitor< pass_type>::visit( ConstructorExpr * node ) { 
246        VISIT_BODY( node ); 
247}
248
249template< typename pass_type >
250void PassVisitor< pass_type>::visit( CompoundLiteralExpr * node ) { 
251        VISIT_BODY( node ); 
252}
253
254template< typename pass_type >
255void PassVisitor< pass_type>::visit( UntypedValofExpr * node ) { 
256        VISIT_BODY( node ); 
257}
258
259template< typename pass_type >
260void PassVisitor< pass_type>::visit( RangeExpr * node ) { 
261        VISIT_BODY( node ); 
262}
263
264template< typename pass_type >
265void PassVisitor< pass_type>::visit( UntypedTupleExpr * node ) { 
266        VISIT_BODY( node ); 
267}
268
269template< typename pass_type >
270void PassVisitor< pass_type>::visit( TupleExpr * node ) { 
271        VISIT_BODY( node ); 
272}
273
274template< typename pass_type >
275void PassVisitor< pass_type>::visit( TupleIndexExpr * node ) { 
276        VISIT_BODY( node ); 
277}
278
279template< typename pass_type >
280void PassVisitor< pass_type>::visit( MemberTupleExpr * node ) { 
281        VISIT_BODY( node ); 
282}
283
284template< typename pass_type >
285void PassVisitor< pass_type>::visit( TupleAssignExpr * node ) { 
286        VISIT_BODY( node ); 
287}
288
289template< typename pass_type >
290void PassVisitor< pass_type>::visit( StmtExpr * node ) { 
291        VISIT_BODY( node ); 
292}
293
294template< typename pass_type >
295void PassVisitor< pass_type>::visit( UniqueExpr * node ) { 
296        VISIT_BODY( node ); 
297}
298
299template< typename pass_type >
300void PassVisitor< pass_type>::visit( VoidType * node ) { 
301        VISIT_BODY( node ); 
302}
303
304template< typename pass_type >
305void PassVisitor< pass_type>::visit( BasicType * node ) { 
306        VISIT_BODY( node ); 
307}
308
309template< typename pass_type >
310void PassVisitor< pass_type>::visit( PointerType * node ) { 
311        VISIT_BODY( node ); 
312}
313
314template< typename pass_type >
315void PassVisitor< pass_type>::visit( ArrayType * node ) { 
316        VISIT_BODY( node ); 
317}
318
319template< typename pass_type >
320void PassVisitor< pass_type>::visit( FunctionType * node ) { 
321        VISIT_BODY( node ); 
322}
323
324template< typename pass_type >
325void PassVisitor< pass_type>::visit( StructInstType * node ) { 
326        VISIT_BODY( node ); 
327}
328
329template< typename pass_type >
330void PassVisitor< pass_type>::visit( UnionInstType * node ) { 
331        VISIT_BODY( node ); 
332}
333
334template< typename pass_type >
335void PassVisitor< pass_type>::visit( EnumInstType * node ) { 
336        VISIT_BODY( node ); 
337}
338
339template< typename pass_type >
340void PassVisitor< pass_type>::visit( TraitInstType * node ) { 
341        VISIT_BODY( node ); 
342}
343
344template< typename pass_type >
345void PassVisitor< pass_type>::visit( TypeInstType * node ) { 
346        VISIT_BODY( node ); 
347}
348
349template< typename pass_type >
350void PassVisitor< pass_type>::visit( TupleType * node ) { 
351        VISIT_BODY( node ); 
352}
353
354template< typename pass_type >
355void PassVisitor< pass_type>::visit( TypeofType * node ) { 
356        VISIT_BODY( node ); 
357}
358
359template< typename pass_type >
360void PassVisitor< pass_type>::visit( AttrType * node ) { 
361        VISIT_BODY( node ); 
362}
363
364template< typename pass_type >
365void PassVisitor< pass_type>::visit( VarArgsType * node ) { 
366        VISIT_BODY( node ); 
367}
368
369template< typename pass_type >
370void PassVisitor< pass_type>::visit( ZeroType * node ) { 
371        VISIT_BODY( node ); 
372}
373
374template< typename pass_type >
375void PassVisitor< pass_type>::visit( OneType * node ) { 
376        VISIT_BODY( node ); 
377}
378
379template< typename pass_type >
380void PassVisitor< pass_type>::visit( SingleInit * node ) { 
381        VISIT_BODY( node ); 
382}
383
384template< typename pass_type >
385void PassVisitor< pass_type>::visit( ListInit * node ) { 
386        VISIT_BODY( node ); 
387}
388
389template< typename pass_type >
390void PassVisitor< pass_type>::visit( ConstructorInit * node ) { 
391        VISIT_BODY( node ); 
392}
393
394template< typename pass_type >
395void PassVisitor< pass_type>::visit( Subrange * node ) { 
396        VISIT_BODY( node ); 
397}
398
399template< typename pass_type >
400void PassVisitor< pass_type>::visit( Constant * node ) { 
401        VISIT_BODY( node ); 
402}
Note: See TracBrowser for help on using the repository browser.