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