Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2922-DataCompletenessChartPerf/HeuristicLab.ExtLibs/HeuristicLab.NRefactory/5.5.0/NRefactory.CSharp-5.5.0/Parser/mcs/visit.cs

Last change on this file was 11700, checked in by jkarder, 10 years ago

#2077: created branch and added first version

File size: 10.3 KB
Line 
1//
2// visit.cs: Visitors for parsed dom
3//
4// Authors: Mike Krüger (mkrueger@novell.com)
5//          Marek Safar (marek.safar@gmail.com)
6//
7// Dual licensed under the terms of the MIT X11 or GNU GPL
8//
9// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
10// Copyright 2011 Xamarin Inc
11//
12
13using System;
14using System.Diagnostics;
15
16namespace Mono.CSharp
17{
18  public abstract class StructuralVisitor
19  {
20    public virtual void Visit (MemberCore member)
21    {
22      Debug.Fail ("unknown member type: " + member.GetType ());
23    }
24
25    public virtual void Visit (ModuleContainer mc)
26    {
27      foreach (var container in mc.Containers) {
28        container.Accept (this);
29      }
30    }
31
32    void VisitTypeDefinition (TypeDefinition tc)
33    {
34      foreach (var member in tc.Members) {
35        member.Accept (this);
36      }
37    }
38
39    public virtual void Visit (NamespaceContainer ns)
40    {
41    }
42
43    public virtual void Visit (UsingNamespace un)
44    {
45    }
46
47    public virtual void Visit (UsingAliasNamespace uan)
48    {
49    }
50   
51    public virtual void Visit (UsingExternAlias uea)
52    {
53    }
54
55    public virtual void Visit (CompilationSourceFile csf)
56    {
57    }
58
59    public virtual void Visit (Class c)
60    {
61      VisitTypeDefinition (c);
62    }
63
64    public virtual void Visit (Struct s)
65    {
66      VisitTypeDefinition (s);
67    }
68
69
70    public virtual void Visit (Interface i)
71    {
72      VisitTypeDefinition (i);
73    }
74
75    public virtual void Visit (Delegate d)
76    {
77    }
78
79    public virtual void Visit (Enum e)
80    {
81      VisitTypeDefinition (e);
82    }
83
84    public virtual void Visit (FixedField f)
85    {
86    }
87
88    public virtual void Visit (Const c)
89    {
90    }
91
92    public virtual void Visit (Field f)
93    {
94    }
95
96    public virtual void Visit (Operator o)
97    {
98    }
99
100    public virtual void Visit (Indexer i)
101    {
102    }
103
104    public virtual void Visit (Method m)
105    {
106    }
107
108    public virtual void Visit (Property p)
109    {
110    }
111
112    public virtual void Visit (Constructor c)
113    {
114    }
115
116    public virtual void Visit (Destructor d)
117    {
118    }
119
120    public virtual void Visit (EventField e)
121    {
122    }
123    public virtual void Visit (EventProperty ep)
124    {
125    }
126
127    public virtual void Visit (EnumMember em)
128    {
129    }
130   
131    public virtual object Visit (Statement stmt)
132    {
133      Debug.Fail ("unknown statement:" + stmt);
134      return null;
135    }
136   
137    public virtual object Visit (BlockVariable blockVariableDeclaration)
138    {
139      return null;
140    }
141   
142    public virtual object Visit (BlockConstant blockConstantDeclaration)
143    {
144      return null;
145    }
146   
147    public virtual object Visit (EmptyStatement emptyStatement)
148    {
149      return null;
150    }
151
152    public virtual object Visit (EmptyExpressionStatement emptyExpressionStatement)
153    {
154      return null;
155    }
156
157    public virtual object Visit (EmptyExpression emptyExpression)
158    {
159      return null;
160    }
161   
162    public virtual object Visit (ErrorExpression errorExpression)
163    {
164      return null;
165    }
166
167    public virtual object Visit (If ifStatement)
168    {
169      return null;
170    }
171
172
173    public virtual object Visit (Do doStatement)
174    {
175      return null;
176    }
177
178    public virtual object Visit (While whileStatement)
179    {
180      return null;
181    }
182
183    public virtual object Visit (For forStatement)
184    {
185      return null;
186    }
187
188    public virtual object Visit (StatementExpression statementExpression)
189    {
190      return null;
191    }
192
193    public virtual object Visit (StatementErrorExpression errorStatement)
194    {
195      return null;
196    }
197
198    public virtual object Visit (Return returnStatement)
199    {
200      return null;
201    }
202
203    public virtual object Visit (Goto gotoStatement)
204    {
205      return null;
206    }
207
208    public virtual object Visit (LabeledStatement labeledStatement)
209    {
210      return null;
211    }
212
213    public virtual object Visit (SwitchLabel switchLabel)
214    {
215      return null;
216    }
217
218    public virtual object Visit (GotoDefault gotoDefault)
219    {
220      return null;
221    }
222
223    public virtual object Visit (GotoCase gotoCase)
224    {
225      return null;
226    }
227
228    public virtual object Visit (Throw throwStatement)
229    {
230      return null;
231    }
232
233    public virtual object Visit (Break breakStatement)
234    {
235      return null;
236    }
237
238    public virtual object Visit (Continue continueStatement)
239    {
240      return null;
241    }
242
243    public virtual object Visit (Block blockStatement)
244    {
245      return null;
246    }
247   
248    public virtual object Visit (Switch switchStatement)
249    {
250      return null;
251    }
252   
253    public virtual object Visit (StatementList statementList)
254    {
255      return null;
256    }
257   
258    public virtual object Visit (Lock lockStatement)
259    {
260      return null;
261    }
262
263    public virtual object Visit (Unchecked uncheckedStatement)
264    {
265      return null;
266    }
267
268    public virtual object Visit (Checked checkedStatement)
269    {
270      return null;
271    }
272
273    public virtual object Visit (Unsafe unsafeStatement)
274    {
275      return null;
276    }
277
278
279    public virtual object Visit (Fixed fixedStatement)
280    {
281      return null;
282    }
283
284
285    public virtual object Visit (TryFinally tryFinallyStatement)
286    {
287      return null;
288    }
289
290    public virtual object Visit (TryCatch tryCatchStatement)
291    {
292      return null;
293    }
294
295    public virtual object Visit (Using usingStatement)
296    {
297      return null;
298    }
299
300    public virtual object Visit (Foreach foreachStatement)
301    {
302      return null;
303    }
304
305    public virtual object Visit (Yield yieldStatement)
306    {
307      return null;
308    }
309
310    public virtual object Visit (YieldBreak yieldBreakStatement)
311    {
312      return null;
313    }
314   
315    public virtual object Visit (InvalidStatementExpression invalidStatementExpression)
316    {
317      return null;
318    }
319
320    public virtual object Visit (Expression expression)
321    {
322      Debug.Fail ("Visit unknown expression:" + expression);
323      return null;
324    }
325
326    public virtual object Visit (MemberAccess memberAccess)
327    {
328      return null;
329    }
330
331    public virtual object Visit (QualifiedAliasMember qualifiedAliasMember)
332    {
333      return null;
334    }
335
336    public virtual object Visit (LocalVariableReference localVariableReference)
337    {
338      return null;
339    }
340
341    public virtual object Visit (Constant constant)
342    {
343      return null;
344    }
345
346    public virtual object Visit (BooleanExpression booleanExpression)
347    {
348      return null;
349    }
350
351    public virtual object Visit (SimpleName simpleName)
352    {
353      return null;
354    }
355
356    public virtual object Visit (ParenthesizedExpression parenthesizedExpression)
357    {
358      return null;
359    }
360
361    public virtual object Visit (Unary unaryExpression)
362    {
363      return null;
364    }
365
366    public virtual object Visit (UnaryMutator unaryMutatorExpression)
367    {
368      return null;
369    }
370
371    // *expr
372    public virtual object Visit (Indirection indirectionExpression)
373    {
374      return null;
375    }
376
377    public virtual object Visit (Is isExpression)
378    {
379      return null;
380    }
381
382    public virtual object Visit (As asExpression)
383    {
384      return null;
385    }
386
387    public virtual object Visit (Cast castExpression)
388    {
389      return null;
390    }
391
392    public virtual object Visit (ComposedCast composedCast)
393    {
394      return null;
395    }
396
397    public virtual object Visit (DefaultValueExpression defaultValueExpression)
398    {
399      return null;
400    }
401   
402    public virtual object Visit (DefaultParameterValueExpression defaultParameterValueExpression)
403    {
404      return null;
405    }
406   
407    public virtual object Visit (Binary binaryExpression)
408    {
409      return null;
410    }
411
412    public virtual object Visit (Nullable.NullCoalescingOperator nullCoalescingOperator)
413    {
414      return null;
415    }
416
417    public virtual object Visit (Conditional conditionalExpression)
418    {
419      return null;
420    }
421
422    public virtual object Visit (Invocation invocationExpression)
423    {
424      return null;
425    }
426
427    public virtual object Visit (New newExpression)
428    {
429      return null;
430    }
431
432    public virtual object Visit (NewAnonymousType newAnonymousType)
433    {
434      return null;
435    }
436
437    public virtual object Visit (NewInitialize newInitializeExpression)
438    {
439      return null;
440    }
441
442    public virtual object Visit (ArrayCreation arrayCreationExpression)
443    {
444      return null;
445    }
446
447    public virtual object Visit (This thisExpression)
448    {
449      return null;
450    }
451
452    public virtual object Visit (ArglistAccess argListAccessExpression)
453    {
454      return null;
455    }
456
457    public virtual object Visit (Arglist argListExpression)
458    {
459      return null;
460    }
461
462    public virtual object Visit (TypeOf typeOfExpression)
463    {
464      return null;
465    }
466
467    public virtual object Visit (SizeOf sizeOfExpression)
468    {
469      return null;
470    }
471
472    public virtual object Visit (CheckedExpr checkedExpression)
473    {
474      return null;
475    }
476
477    public virtual object Visit (UnCheckedExpr uncheckedExpression)
478    {
479      return null;
480    }
481
482    public virtual object Visit (ElementAccess elementAccessExpression)
483    {
484      return null;
485    }
486
487    public virtual object Visit (BaseThis baseAccessExpression)
488    {
489      return null;
490    }
491
492    public virtual object Visit (StackAlloc stackAllocExpression)
493    {
494      return null;
495    }
496
497    public virtual object Visit (SimpleAssign simpleAssign)
498    {
499      return null;
500    }
501
502    public virtual object Visit (CompoundAssign compoundAssign)
503    {
504      return null;
505    }
506
507    public virtual object Visit (TypeExpression typeExpression)
508    {
509      return null;
510    }
511
512    public virtual object Visit (AnonymousMethodExpression anonymousMethodExpression)
513    {
514      return null;
515    }
516   
517    public virtual object Visit (LambdaExpression lambdaExpression)
518    {
519      return null;
520    }
521   
522    public virtual object Visit (ConstInitializer constInitializer)
523    {
524      return null;
525    }
526   
527    public virtual object Visit (ArrayInitializer arrayInitializer)
528    {
529      return null;
530    }
531   
532    public virtual object Visit (Linq.QueryExpression queryExpression)
533    {
534      return null;
535    }
536
537    public virtual object Visit (Linq.QueryStartClause queryExpression)
538    {
539      return null;
540    }
541   
542    public virtual object Visit (Linq.SelectMany selectMany)
543    {
544      return null;
545    }
546
547    public virtual object Visit (Linq.Select select)
548    {
549      return null;
550    }
551
552    public virtual object Visit (Linq.GroupBy groupBy)
553    {
554      return null;
555    }
556
557    public virtual object Visit (Linq.Let let)
558    {
559      return null;
560    }
561
562    public virtual object Visit (Linq.Where where)
563    {
564      return null;
565    }
566
567    public virtual object Visit (Linq.Join join)
568    {
569      return null;
570    }
571
572    public virtual object Visit (Linq.GroupJoin groupJoin)
573    {
574      return null;
575    }
576
577    public virtual object Visit (Linq.OrderByAscending orderByAscending)
578    {
579      return null;
580    }
581
582    public virtual object Visit (Linq.OrderByDescending orderByDescending)
583    {
584      return null;
585    }
586
587    public virtual object Visit (Linq.ThenByAscending thenByAscending)
588    {
589      return null;
590    }
591   
592    public virtual object Visit (Linq.ThenByDescending thenByDescending)
593    {
594      return null;
595    }
596   
597    // undocumented expressions
598    public virtual object Visit (RefValueExpr refValueExpr)
599    {
600      return null;
601    }
602   
603    public virtual object Visit (RefTypeExpr refTypeExpr)
604    {
605      return null;
606    }
607   
608    public virtual object Visit (MakeRefExpr makeRefExpr)
609    {
610      return null;
611    }
612
613    public virtual object Visit (Await awaitExpr)
614    {
615      return null;
616    }
617  }
618}
Note: See TracBrowser for help on using the repository browser.