Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2434_crossvalidation/HeuristicLab.ExtLibs/HeuristicLab.NRefactory/5.5.0/NRefactory.CSharp-5.5.0/Ast/ObservableAstVisitor.cs

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

#2077: created branch and added first version

File size: 31.0 KB
Line 
1//
2// ObservableAstVisitor.cs
3//
4// Author:
5//       Mike Krüger <mkrueger@novell.com>
6//
7// Copyright (c) 2011 Novell, Inc (http://www.novell.com)
8//
9// Permission is hereby granted, free of charge, to any person obtaining a copy
10// of this software and associated documentation files (the "Software"), to deal
11// in the Software without restriction, including without limitation the rights
12// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13// copies of the Software, and to permit persons to whom the Software is
14// furnished to do so, subject to the following conditions:
15//
16// The above copyright notice and this permission notice shall be included in
17// all copies or substantial portions of the Software.
18//
19// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25// THE SOFTWARE.
26
27using System;
28
29namespace ICSharpCode.NRefactory.CSharp
30{
31  public class ObservableAstVisitor : IAstVisitor
32  {
33    void Visit<T>(Action<T> enter, Action<T> leave, T node) where T : AstNode
34    {
35      if (enter != null)
36        enter(node);
37      AstNode next;
38      for (var child = node.FirstChild; child != null; child = next) {
39        // Store next to allow the loop to continue
40        // if the visitor removes/replaces children.
41        next = child.NextSibling;
42        child.AcceptVisitor (this);
43      }
44      if (leave != null)
45        leave(node);
46    }
47
48    void IAstVisitor.VisitNullNode(AstNode nullNode)
49    {
50    }
51
52    void IAstVisitor.VisitErrorNode(AstNode nullNode)
53    {
54    }
55
56    public event Action<SyntaxTree> EnterSyntaxTree, LeaveSyntaxTree;
57   
58    void IAstVisitor.VisitSyntaxTree(SyntaxTree unit)
59    {
60      Visit(EnterSyntaxTree, LeaveSyntaxTree, unit);
61    }
62   
63    public event Action<Comment> EnterComment, LeaveComment;
64   
65    void IAstVisitor.VisitComment(Comment comment)
66    {
67      Visit(EnterComment, LeaveComment, comment);
68    }
69   
70    public event Action<NewLineNode> EnterNewLine, LeaveNewLine;
71   
72    void IAstVisitor.VisitNewLine(NewLineNode newLineNode)
73    {
74      Visit(EnterNewLine, LeaveNewLine, newLineNode);
75    }
76   
77    public event Action<WhitespaceNode> EnterWhitespace, LeaveWhitespace;
78   
79    void IAstVisitor.VisitWhitespace(WhitespaceNode whitespace)
80    {
81      Visit(EnterWhitespace, LeaveWhitespace, whitespace);
82    }
83   
84    public event Action<TextNode> EnterText, LeaveText;
85   
86    void IAstVisitor.VisitText(TextNode textNode)
87    {
88      Visit(EnterText, LeaveText, textNode);
89    }
90   
91    public event Action<PreProcessorDirective> EnterPreProcessorDirective, LeavePreProcessorDirective;
92    void IAstVisitor.VisitPreProcessorDirective(PreProcessorDirective preProcessorDirective)
93    {
94      Visit(EnterPreProcessorDirective, LeavePreProcessorDirective, preProcessorDirective);
95    }
96   
97    public event Action<DocumentationReference> EnterDocumentationReference, LeaveDocumentationReference;
98   
99    void IAstVisitor.VisitDocumentationReference(DocumentationReference documentationReference)
100    {
101      Visit(EnterDocumentationReference, LeaveDocumentationReference, documentationReference);
102    }
103   
104    public event Action<Identifier> EnterIdentifier, LeaveIdentifier;
105   
106    void IAstVisitor.VisitIdentifier(Identifier identifier)
107    {
108      Visit(EnterIdentifier, LeaveIdentifier, identifier);
109    }
110   
111    public event Action<CSharpTokenNode> EnterCSharpTokenNode, LeaveCSharpTokenNode;
112   
113    void IAstVisitor.VisitCSharpTokenNode(CSharpTokenNode token)
114    {
115      Visit(EnterCSharpTokenNode, LeaveCSharpTokenNode, token);
116    }
117   
118    public event Action<PrimitiveType> EnterPrimitiveType, LeavePrimitiveType;
119   
120    void IAstVisitor.VisitPrimitiveType(PrimitiveType primitiveType)
121    {
122      Visit(EnterPrimitiveType, LeavePrimitiveType, primitiveType);
123    }
124   
125    public event Action<ComposedType> EnterComposedType, LeaveComposedType;
126   
127    void IAstVisitor.VisitComposedType(ComposedType composedType)
128    {
129      Visit(EnterComposedType, LeaveComposedType, composedType);
130    }
131   
132    public event Action<SimpleType> EnterSimpleType, LeaveSimpleType;
133   
134    void IAstVisitor.VisitSimpleType(SimpleType simpleType)
135    {
136      Visit(EnterSimpleType, LeaveSimpleType, simpleType);
137    }
138   
139    public event Action<MemberType> EnterMemberType, LeaveMemberType;
140   
141    void IAstVisitor.VisitMemberType(MemberType memberType)
142    {
143      Visit(EnterMemberType, LeaveMemberType, memberType);
144    }
145   
146    public event Action<Attribute> EnterAttribute, LeaveAttribute;
147   
148    void IAstVisitor.VisitAttribute(Attribute attribute)
149    {
150      Visit(EnterAttribute, LeaveAttribute, attribute);
151    }
152   
153    public event Action<AttributeSection> EnterAttributeSection, LeaveAttributeSection;
154   
155    void IAstVisitor.VisitAttributeSection(AttributeSection attributeSection)
156    {
157      Visit(EnterAttributeSection, LeaveAttributeSection, attributeSection);
158    }
159   
160    public event Action<DelegateDeclaration> EnterDelegateDeclaration, LeaveDelegateDeclaration;
161   
162    void IAstVisitor.VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration)
163    {
164      Visit(EnterDelegateDeclaration, LeaveDelegateDeclaration, delegateDeclaration);
165    }
166   
167    public event Action<NamespaceDeclaration> EnterNamespaceDeclaration, LeaveNamespaceDeclaration;
168   
169    void IAstVisitor.VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration)
170    {
171      Visit(EnterNamespaceDeclaration, LeaveNamespaceDeclaration, namespaceDeclaration);
172    }
173   
174    public event Action<TypeDeclaration> EnterTypeDeclaration, LeaveTypeDeclaration;
175   
176    void IAstVisitor.VisitTypeDeclaration(TypeDeclaration typeDeclaration)
177    {
178      Visit(EnterTypeDeclaration, LeaveTypeDeclaration, typeDeclaration);
179    }
180   
181    public event Action<TypeParameterDeclaration> EnterTypeParameterDeclaration, LeaveTypeParameterDeclaration;
182   
183    void IAstVisitor.VisitTypeParameterDeclaration(TypeParameterDeclaration typeParameterDeclaration)
184    {
185      Visit(EnterTypeParameterDeclaration, LeaveTypeParameterDeclaration, typeParameterDeclaration);
186    }
187   
188    public event Action<EnumMemberDeclaration> EnterEnumMemberDeclaration, LeaveEnumMemberDeclaration;
189   
190    void IAstVisitor.VisitEnumMemberDeclaration(EnumMemberDeclaration enumMemberDeclaration)
191    {
192      Visit(EnterEnumMemberDeclaration, LeaveEnumMemberDeclaration, enumMemberDeclaration);
193    }
194   
195    public event Action<UsingDeclaration> EnterUsingDeclaration, LeaveUsingDeclaration;
196   
197    void IAstVisitor.VisitUsingDeclaration(UsingDeclaration usingDeclaration)
198    {
199      Visit(EnterUsingDeclaration, LeaveUsingDeclaration, usingDeclaration);
200    }
201   
202    public event Action<UsingAliasDeclaration> EnterUsingAliasDeclaration, LeaveUsingAliasDeclaration;
203   
204    void IAstVisitor.VisitUsingAliasDeclaration(UsingAliasDeclaration usingDeclaration)
205    {
206      Visit(EnterUsingAliasDeclaration, LeaveUsingAliasDeclaration, usingDeclaration);
207    }
208   
209    public event Action<ExternAliasDeclaration> EnterExternAliasDeclaration, LeaveExternAliasDeclaration;
210   
211    void IAstVisitor.VisitExternAliasDeclaration(ExternAliasDeclaration externAliasDeclaration)
212    {
213      Visit(EnterExternAliasDeclaration, LeaveExternAliasDeclaration, externAliasDeclaration);
214    }
215   
216    public event Action<ConstructorDeclaration> EnterConstructorDeclaration, LeaveConstructorDeclaration;
217   
218    void IAstVisitor.VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
219    {
220      Visit(EnterConstructorDeclaration, LeaveConstructorDeclaration, constructorDeclaration);
221    }
222   
223    public event Action<ConstructorInitializer> EnterConstructorInitializer, LeaveConstructorInitializer;
224   
225    void IAstVisitor.VisitConstructorInitializer(ConstructorInitializer constructorInitializer)
226    {
227      Visit(EnterConstructorInitializer, LeaveConstructorInitializer, constructorInitializer);
228    }
229   
230    public event Action<DestructorDeclaration> EnterDestructorDeclaration, LeaveDestructorDeclaration;
231   
232    void IAstVisitor.VisitDestructorDeclaration(DestructorDeclaration destructorDeclaration)
233    {
234      Visit(EnterDestructorDeclaration, LeaveDestructorDeclaration, destructorDeclaration);
235    }
236   
237    public event Action<EventDeclaration> EnterEventDeclaration, LeaveEventDeclaration;
238   
239    void IAstVisitor.VisitEventDeclaration(EventDeclaration eventDeclaration)
240    {
241      Visit(EnterEventDeclaration, LeaveEventDeclaration, eventDeclaration);
242    }
243   
244    public event Action<CustomEventDeclaration> EnterCustomEventDeclaration, LeaveCustomEventDeclaration;
245   
246    void IAstVisitor.VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
247    {
248      Visit(EnterCustomEventDeclaration, LeaveCustomEventDeclaration, eventDeclaration);
249    }
250   
251    public event Action<FieldDeclaration> EnterFieldDeclaration, LeaveFieldDeclaration;
252   
253    void IAstVisitor.VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
254    {
255      Visit(EnterFieldDeclaration, LeaveFieldDeclaration, fieldDeclaration);
256    }
257   
258    public event Action<FixedFieldDeclaration> EnterFixedFieldDeclaration, LeaveFixedFieldDeclaration;
259   
260    void IAstVisitor.VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
261    {
262      Visit(EnterFixedFieldDeclaration, LeaveFixedFieldDeclaration, fixedFieldDeclaration);
263    }
264   
265    public event Action<FixedVariableInitializer> EnterFixedVariableInitializer, LeaveFixedVariableInitializer;
266   
267    void IAstVisitor.VisitFixedVariableInitializer(FixedVariableInitializer fixedVariableInitializer)
268    {
269      Visit(EnterFixedVariableInitializer, LeaveFixedVariableInitializer, fixedVariableInitializer);
270    }
271   
272    public event Action<IndexerDeclaration> EnterIndexerDeclaration, LeaveIndexerDeclaration;
273   
274    void IAstVisitor.VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
275    {
276      Visit(EnterIndexerDeclaration, LeaveIndexerDeclaration, indexerDeclaration);
277    }
278   
279    public event Action<MethodDeclaration> EnterMethodDeclaration, LeaveMethodDeclaration;
280   
281    void IAstVisitor.VisitMethodDeclaration(MethodDeclaration methodDeclaration)
282    {
283      Visit(EnterMethodDeclaration, LeaveMethodDeclaration, methodDeclaration);
284    }
285   
286    public event Action<OperatorDeclaration> EnterOperatorDeclaration, LeaveOperatorDeclaration;
287   
288    void IAstVisitor.VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration)
289    {
290      Visit(EnterOperatorDeclaration, LeaveOperatorDeclaration, operatorDeclaration);
291    }
292   
293    public event Action<PropertyDeclaration> EnterPropertyDeclaration, LeavePropertyDeclaration;
294   
295    void IAstVisitor.VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
296    {
297      Visit(EnterPropertyDeclaration, LeavePropertyDeclaration, propertyDeclaration);
298    }
299   
300    public event Action<Accessor> EnterAccessor, LeaveAccessor;
301   
302    void IAstVisitor.VisitAccessor(Accessor accessor)
303    {
304      Visit(EnterAccessor, LeaveAccessor, accessor);
305    }
306   
307    public event Action<VariableInitializer> EnterVariableInitializer, LeaveVariableInitializer;
308   
309    void IAstVisitor.VisitVariableInitializer(VariableInitializer variableInitializer)
310    {
311      Visit(EnterVariableInitializer, LeaveVariableInitializer, variableInitializer);
312    }
313   
314    public event Action<ParameterDeclaration> EnterParameterDeclaration, LeaveParameterDeclaration;
315   
316    void IAstVisitor.VisitParameterDeclaration(ParameterDeclaration parameterDeclaration)
317    {
318      Visit(EnterParameterDeclaration, LeaveParameterDeclaration, parameterDeclaration);
319    }
320   
321    public event Action<Constraint> EnterConstraint, LeaveConstraint;
322   
323    void IAstVisitor.VisitConstraint(Constraint constraint)
324    {
325      Visit(EnterConstraint, LeaveConstraint, constraint);
326    }
327   
328    public event Action<BlockStatement> EnterBlockStatement, LeaveBlockStatement;
329   
330    void IAstVisitor.VisitBlockStatement(BlockStatement blockStatement)
331    {
332      Visit(EnterBlockStatement, LeaveBlockStatement, blockStatement);
333    }
334   
335    public event Action<ExpressionStatement> EnterExpressionStatement, LeaveExpressionStatement;
336   
337    void IAstVisitor.VisitExpressionStatement(ExpressionStatement expressionStatement)
338    {
339      Visit(EnterExpressionStatement, LeaveExpressionStatement, expressionStatement);
340    }
341   
342    public event Action<BreakStatement> EnterBreakStatement, LeaveBreakStatement;
343   
344    void IAstVisitor.VisitBreakStatement(BreakStatement breakStatement)
345    {
346      Visit(EnterBreakStatement, LeaveBreakStatement, breakStatement);
347    }
348   
349    public event Action<CheckedStatement> EnterCheckedStatement, LeaveCheckedStatement;
350   
351    void IAstVisitor.VisitCheckedStatement(CheckedStatement checkedStatement)
352    {
353      Visit(EnterCheckedStatement, LeaveCheckedStatement, checkedStatement);
354    }
355   
356    public event Action<ContinueStatement> EnterContinueStatement, LeaveContinueStatement;
357   
358    void IAstVisitor.VisitContinueStatement(ContinueStatement continueStatement)
359    {
360      Visit(EnterContinueStatement, LeaveContinueStatement, continueStatement);
361    }
362   
363    public event Action<DoWhileStatement> EnterDoWhileStatement, LeaveDoWhileStatement;
364   
365    void IAstVisitor.VisitDoWhileStatement(DoWhileStatement doWhileStatement)
366    {
367      Visit(EnterDoWhileStatement, LeaveDoWhileStatement, doWhileStatement);
368    }
369   
370    public event Action<EmptyStatement> EnterEmptyStatement, LeaveEmptyStatement;
371   
372    void IAstVisitor.VisitEmptyStatement(EmptyStatement emptyStatement)
373    {
374      Visit(EnterEmptyStatement, LeaveEmptyStatement, emptyStatement);
375    }
376   
377    public event Action<FixedStatement> EnterFixedStatement, LeaveFixedStatement;
378   
379    void IAstVisitor.VisitFixedStatement(FixedStatement fixedStatement)
380    {
381      Visit(EnterFixedStatement, LeaveFixedStatement, fixedStatement);
382    }
383   
384    public event Action<ForeachStatement> EnterForeachStatement, LeaveForeachStatement;
385   
386    void IAstVisitor.VisitForeachStatement(ForeachStatement foreachStatement)
387    {
388      Visit(EnterForeachStatement, LeaveForeachStatement, foreachStatement);
389    }
390   
391    public event Action<ForStatement> EnterForStatement, LeaveForStatement;
392   
393    void IAstVisitor.VisitForStatement(ForStatement forStatement)
394    {
395      Visit(EnterForStatement, LeaveForStatement, forStatement);
396    }
397   
398    public event Action<GotoCaseStatement> EnterGotoCaseStatement, LeaveGotoCaseStatement;
399   
400    void IAstVisitor.VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement)
401    {
402      Visit(EnterGotoCaseStatement, LeaveGotoCaseStatement, gotoCaseStatement);
403    }
404   
405    public event Action<GotoDefaultStatement> EnterGotoDefaultStatement, LeaveGotoDefaultStatement;
406   
407    void IAstVisitor.VisitGotoDefaultStatement(GotoDefaultStatement gotoDefaultStatement)
408    {
409      Visit(EnterGotoDefaultStatement, LeaveGotoDefaultStatement, gotoDefaultStatement);
410    }
411   
412    public event Action<GotoStatement> EnterGotoStatement, LeaveGotoStatement;
413   
414    void IAstVisitor.VisitGotoStatement(GotoStatement gotoStatement)
415    {
416      Visit(EnterGotoStatement, LeaveGotoStatement, gotoStatement);
417    }
418   
419    public event Action<IfElseStatement> EnterIfElseStatement, LeaveIfElseStatement;
420   
421    void IAstVisitor.VisitIfElseStatement(IfElseStatement ifElseStatement)
422    {
423      Visit(EnterIfElseStatement, LeaveIfElseStatement, ifElseStatement);
424    }
425   
426    public event Action<LabelStatement> EnterLabelStatement, LeaveLabelStatement;
427   
428    void IAstVisitor.VisitLabelStatement(LabelStatement labelStatement)
429    {
430      Visit(EnterLabelStatement, LeaveLabelStatement, labelStatement);
431    }
432   
433    public event Action<LockStatement> EnterLockStatement, LeaveLockStatement;
434   
435    void IAstVisitor.VisitLockStatement(LockStatement lockStatement)
436    {
437      Visit(EnterLockStatement, LeaveLockStatement, lockStatement);
438    }
439   
440    public event Action<ReturnStatement> EnterReturnStatement, LeaveReturnStatement;
441   
442    void IAstVisitor.VisitReturnStatement(ReturnStatement returnStatement)
443    {
444      Visit(EnterReturnStatement, LeaveReturnStatement, returnStatement);
445    }
446   
447    public event Action<SwitchStatement> EnterSwitchStatement, LeaveSwitchStatement;
448   
449    void IAstVisitor.VisitSwitchStatement(SwitchStatement switchStatement)
450    {
451      Visit(EnterSwitchStatement, LeaveSwitchStatement, switchStatement);
452    }
453   
454    public event Action<SwitchSection> EnterSwitchSection, LeaveSwitchSection;
455   
456    void IAstVisitor.VisitSwitchSection(SwitchSection switchSection)
457    {
458      Visit(EnterSwitchSection, LeaveSwitchSection, switchSection);
459    }
460   
461    public event Action<CaseLabel> EnterCaseLabel, LeaveCaseLabel;
462   
463    void IAstVisitor.VisitCaseLabel(CaseLabel caseLabel)
464    {
465      Visit(EnterCaseLabel, LeaveCaseLabel, caseLabel);
466    }
467   
468    public event Action<ThrowStatement> EnterThrowStatement, LeaveThrowStatement;
469   
470    void IAstVisitor.VisitThrowStatement(ThrowStatement throwStatement)
471    {
472      Visit(EnterThrowStatement, LeaveThrowStatement, throwStatement);
473    }
474   
475    public event Action<TryCatchStatement> EnterTryCatchStatement, LeaveTryCatchStatement;
476   
477    void IAstVisitor.VisitTryCatchStatement(TryCatchStatement tryCatchStatement)
478    {
479      Visit(EnterTryCatchStatement, LeaveTryCatchStatement, tryCatchStatement);
480    }
481   
482    public event Action<CatchClause> EnterCatchClause, LeaveCatchClause;
483   
484    void IAstVisitor.VisitCatchClause(CatchClause catchClause)
485    {
486      Visit(EnterCatchClause, LeaveCatchClause, catchClause);
487    }
488   
489    public event Action<UncheckedStatement> EnterUncheckedStatement, LeaveUncheckedStatement;
490   
491    void IAstVisitor.VisitUncheckedStatement(UncheckedStatement uncheckedStatement)
492    {
493      Visit(EnterUncheckedStatement, LeaveUncheckedStatement, uncheckedStatement);
494    }
495   
496    public event Action<UnsafeStatement> EnterUnsafeStatement, LeaveUnsafeStatement;
497   
498    void IAstVisitor.VisitUnsafeStatement(UnsafeStatement unsafeStatement)
499    {
500      Visit(EnterUnsafeStatement, LeaveUnsafeStatement, unsafeStatement);
501    }
502   
503    public event Action<UsingStatement> EnterUsingStatement, LeaveUsingStatement;
504   
505    void IAstVisitor.VisitUsingStatement(UsingStatement usingStatement)
506    {
507      Visit(EnterUsingStatement, LeaveUsingStatement, usingStatement);
508    }
509   
510    public event Action<VariableDeclarationStatement> EnterVariableDeclarationStatement, LeaveVariableDeclarationStatement;
511   
512    void IAstVisitor.VisitVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement)
513    {
514      Visit(EnterVariableDeclarationStatement, LeaveVariableDeclarationStatement, variableDeclarationStatement);
515    }
516   
517    public event Action<WhileStatement> EnterWhileStatement, LeaveWhileStatement;
518   
519    void IAstVisitor.VisitWhileStatement(WhileStatement whileStatement)
520    {
521      Visit(EnterWhileStatement, LeaveWhileStatement, whileStatement);
522    }
523   
524    public event Action<YieldBreakStatement> EnterYieldBreakStatement, LeaveYieldBreakStatement;
525   
526    void IAstVisitor.VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
527    {
528      Visit(EnterYieldBreakStatement, LeaveYieldBreakStatement, yieldBreakStatement);
529    }
530   
531    public event Action<YieldReturnStatement> EnterYieldReturnStatement, LeaveYieldReturnStatement;
532   
533    void IAstVisitor.VisitYieldReturnStatement(YieldReturnStatement yieldStatement)
534    {
535      Visit(EnterYieldReturnStatement, LeaveYieldReturnStatement, yieldStatement);
536    }
537   
538    public event Action<AnonymousMethodExpression> EnterAnonymousMethodExpression, LeaveAnonymousMethodExpression;
539   
540    void IAstVisitor.VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression)
541    {
542      Visit(EnterAnonymousMethodExpression, LeaveAnonymousMethodExpression, anonymousMethodExpression);
543    }
544   
545    public event Action<LambdaExpression> EnterLambdaExpression, LeaveLambdaExpression;
546   
547    void IAstVisitor.VisitLambdaExpression(LambdaExpression lambdaExpression)
548    {
549      Visit(EnterLambdaExpression, LeaveLambdaExpression, lambdaExpression);
550    }
551   
552    public event Action<AssignmentExpression> EnterAssignmentExpression, LeaveAssignmentExpression;
553   
554    void IAstVisitor.VisitAssignmentExpression(AssignmentExpression assignmentExpression)
555    {
556      Visit(EnterAssignmentExpression, LeaveAssignmentExpression, assignmentExpression);
557    }
558   
559    public event Action<BaseReferenceExpression> EnterBaseReferenceExpression, LeaveBaseReferenceExpression;
560   
561    void IAstVisitor.VisitBaseReferenceExpression(BaseReferenceExpression baseReferenceExpression)
562    {
563      Visit(EnterBaseReferenceExpression, LeaveBaseReferenceExpression, baseReferenceExpression);
564    }
565   
566    public event Action<BinaryOperatorExpression> EnterBinaryOperatorExpression, LeaveBinaryOperatorExpression;
567   
568    void IAstVisitor.VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression)
569    {
570      Visit(EnterBinaryOperatorExpression, LeaveBinaryOperatorExpression, binaryOperatorExpression);
571    }
572   
573    public event Action<CastExpression> EnterCastExpression, LeaveCastExpression;
574   
575    void IAstVisitor.VisitCastExpression(CastExpression castExpression)
576    {
577      Visit(EnterCastExpression, LeaveCastExpression, castExpression);
578    }
579   
580    public event Action<CheckedExpression> EnterCheckedExpression, LeaveCheckedExpression;
581   
582    void IAstVisitor.VisitCheckedExpression(CheckedExpression checkedExpression)
583    {
584      Visit(EnterCheckedExpression, LeaveCheckedExpression, checkedExpression);
585    }
586   
587    public event Action<ConditionalExpression> EnterConditionalExpression, LeaveConditionalExpression;
588   
589    void IAstVisitor.VisitConditionalExpression(ConditionalExpression conditionalExpression)
590    {
591      Visit(EnterConditionalExpression, LeaveConditionalExpression, conditionalExpression);
592    }
593   
594    public event Action<IdentifierExpression> EnterIdentifierExpression, LeaveIdentifierExpression;
595   
596    void IAstVisitor.VisitIdentifierExpression(IdentifierExpression identifierExpression)
597    {
598      Visit(EnterIdentifierExpression, LeaveIdentifierExpression, identifierExpression);
599    }
600   
601    public event Action<IndexerExpression> EnterIndexerExpression, LeaveIndexerExpression;
602   
603    void IAstVisitor.VisitIndexerExpression(IndexerExpression indexerExpression)
604    {
605      Visit(EnterIndexerExpression, LeaveIndexerExpression, indexerExpression);
606    }
607   
608    public event Action<InvocationExpression> EnterInvocationExpression, LeaveInvocationExpression;
609   
610    void IAstVisitor.VisitInvocationExpression(InvocationExpression invocationExpression)
611    {
612      Visit(EnterInvocationExpression, LeaveInvocationExpression, invocationExpression);
613    }
614   
615    public event Action<DirectionExpression> EnterDirectionExpression, LeaveDirectionExpression;
616   
617    void IAstVisitor.VisitDirectionExpression(DirectionExpression directionExpression)
618    {
619      Visit(EnterDirectionExpression, LeaveDirectionExpression, directionExpression);
620    }
621
622    public event Action<MemberReferenceExpression> EnterMemberReferenceExpression, LeaveMemberReferenceExpression;
623   
624    void IAstVisitor.VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression)
625    {
626      Visit(EnterMemberReferenceExpression, LeaveMemberReferenceExpression, memberReferenceExpression);
627    }
628   
629    public event Action<NullReferenceExpression> EnterNullReferenceExpression, LeaveNullReferenceExpression;
630   
631    void IAstVisitor.VisitNullReferenceExpression(NullReferenceExpression nullReferenceExpression)
632    {
633      Visit(EnterNullReferenceExpression, LeaveNullReferenceExpression, nullReferenceExpression);
634    }
635   
636    public event Action<ObjectCreateExpression> EnterObjectCreateExpression, LeaveObjectCreateExpression;
637   
638    void IAstVisitor.VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression)
639    {
640      Visit(EnterObjectCreateExpression, LeaveObjectCreateExpression, objectCreateExpression);
641    }
642   
643    public event Action<AnonymousTypeCreateExpression> EnterAnonymousTypeCreateExpression, LeaveAnonymousTypeCreateExpression;
644   
645    void IAstVisitor.VisitAnonymousTypeCreateExpression(AnonymousTypeCreateExpression anonymousTypeCreateExpression)
646    {
647      Visit(EnterAnonymousTypeCreateExpression, LeaveAnonymousTypeCreateExpression, anonymousTypeCreateExpression);
648    }
649   
650    public event Action<ArrayCreateExpression> EnterArrayCreateExpression, LeaveArrayCreateExpression;
651   
652    void IAstVisitor.VisitArrayCreateExpression(ArrayCreateExpression arraySCreateExpression)
653    {
654      Visit(EnterArrayCreateExpression, LeaveArrayCreateExpression, arraySCreateExpression);
655    }
656   
657    public event Action<ParenthesizedExpression> EnterParenthesizedExpression, LeaveParenthesizedExpression;
658   
659    void IAstVisitor.VisitParenthesizedExpression(ParenthesizedExpression parenthesizedExpression)
660    {
661      Visit(EnterParenthesizedExpression, LeaveParenthesizedExpression, parenthesizedExpression);
662    }
663   
664    public event Action<PointerReferenceExpression> EnterPointerReferenceExpression, LeavePointerReferenceExpression;
665   
666    void IAstVisitor.VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
667    {
668      Visit(EnterPointerReferenceExpression, LeavePointerReferenceExpression, pointerReferenceExpression);
669    }
670   
671    public event Action<PrimitiveExpression> EnterPrimitiveExpression, LeavePrimitiveExpression;
672   
673    void IAstVisitor.VisitPrimitiveExpression(PrimitiveExpression primitiveExpression)
674    {
675      Visit(EnterPrimitiveExpression, LeavePrimitiveExpression, primitiveExpression);
676    }
677   
678    public event Action<SizeOfExpression> EnterSizeOfExpression, LeaveSizeOfExpression;
679   
680    void IAstVisitor.VisitSizeOfExpression(SizeOfExpression sizeOfExpression)
681    {
682      Visit(EnterSizeOfExpression, LeaveSizeOfExpression, sizeOfExpression);
683    }
684   
685    public event Action<StackAllocExpression> EnterStackAllocExpression, LeaveStackAllocExpression;
686   
687    void IAstVisitor.VisitStackAllocExpression(StackAllocExpression stackAllocExpression)
688    {
689      Visit(EnterStackAllocExpression, LeaveStackAllocExpression, stackAllocExpression);
690    }
691   
692    public event Action<ThisReferenceExpression> EnterThisReferenceExpression, LeaveThisReferenceExpression;
693   
694    void IAstVisitor.VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression)
695    {
696      Visit(EnterThisReferenceExpression, LeaveThisReferenceExpression, thisReferenceExpression);
697    }
698   
699    public event Action<TypeOfExpression> EnterTypeOfExpression, LeaveTypeOfExpression;
700   
701    void IAstVisitor.VisitTypeOfExpression(TypeOfExpression typeOfExpression)
702    {
703      Visit(EnterTypeOfExpression, LeaveTypeOfExpression, typeOfExpression);
704    }
705   
706    public event Action<TypeReferenceExpression> EnterTypeReferenceExpression, LeaveTypeReferenceExpression;
707   
708    void IAstVisitor.VisitTypeReferenceExpression(TypeReferenceExpression typeReferenceExpression)
709    {
710      Visit(EnterTypeReferenceExpression, LeaveTypeReferenceExpression, typeReferenceExpression);
711    }
712   
713    public event Action<UnaryOperatorExpression> EnterUnaryOperatorExpression, LeaveUnaryOperatorExpression;
714   
715    void IAstVisitor.VisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression)
716    {
717      Visit(EnterUnaryOperatorExpression, LeaveUnaryOperatorExpression, unaryOperatorExpression);
718    }
719   
720    public event Action<UncheckedExpression> EnterUncheckedExpression, LeaveUncheckedExpression;
721   
722    void IAstVisitor.VisitUncheckedExpression(UncheckedExpression uncheckedExpression)
723    {
724      Visit(EnterUncheckedExpression, LeaveUncheckedExpression, uncheckedExpression);
725    }
726   
727    public event Action<QueryExpression> EnterQueryExpression, LeaveQueryExpression;
728   
729    void IAstVisitor.VisitQueryExpression(QueryExpression queryExpression)
730    {
731      Visit(EnterQueryExpression, LeaveQueryExpression, queryExpression);
732    }
733   
734    public event Action<QueryContinuationClause> EnterQueryContinuationClause, LeaveQueryContinuationClause;
735   
736    void IAstVisitor.VisitQueryContinuationClause(QueryContinuationClause queryContinuationClause)
737    {
738      Visit(EnterQueryContinuationClause, LeaveQueryContinuationClause, queryContinuationClause);
739    }
740   
741    public event Action<QueryFromClause> EnterQueryFromClause, LeaveQueryFromClause;
742   
743    void IAstVisitor.VisitQueryFromClause(QueryFromClause queryFromClause)
744    {
745      Visit(EnterQueryFromClause, LeaveQueryFromClause, queryFromClause);
746    }
747   
748    public event Action<QueryLetClause> EnterQueryLetClause, LeaveQueryLetClause;
749   
750    void IAstVisitor.VisitQueryLetClause(QueryLetClause queryLetClause)
751    {
752      Visit(EnterQueryLetClause, LeaveQueryLetClause, queryLetClause);
753    }
754   
755    public event Action<QueryWhereClause> EnterQueryWhereClause, LeaveQueryWhereClause;
756   
757    void IAstVisitor.VisitQueryWhereClause(QueryWhereClause queryWhereClause)
758    {
759      Visit(EnterQueryWhereClause, LeaveQueryWhereClause, queryWhereClause);
760    }
761   
762    public event Action<QueryJoinClause> EnterQueryJoinClause, LeaveQueryJoinClause;
763   
764    void IAstVisitor.VisitQueryJoinClause(QueryJoinClause queryJoinClause)
765    {
766      Visit(EnterQueryJoinClause, LeaveQueryJoinClause, queryJoinClause);
767    }
768   
769    public event Action<QueryOrderClause> EnterQueryOrderClause, LeaveQueryOrderClause;
770   
771    void IAstVisitor.VisitQueryOrderClause(QueryOrderClause queryOrderClause)
772    {
773      Visit(EnterQueryOrderClause, LeaveQueryOrderClause, queryOrderClause);
774    }
775   
776    public event Action<QueryOrdering> EnterQueryOrdering, LeaveQueryOrdering;
777   
778    void IAstVisitor.VisitQueryOrdering(QueryOrdering queryOrdering)
779    {
780      Visit(EnterQueryOrdering, LeaveQueryOrdering, queryOrdering);
781    }
782   
783    public event Action<QuerySelectClause> EnterQuerySelectClause, LeaveQuerySelectClause;
784   
785    void IAstVisitor.VisitQuerySelectClause(QuerySelectClause querySelectClause)
786    {
787      Visit(EnterQuerySelectClause, LeaveQuerySelectClause, querySelectClause);
788    }
789   
790    public event Action<QueryGroupClause> EnterQueryGroupClause, LeaveQueryGroupClause;
791   
792    void IAstVisitor.VisitQueryGroupClause(QueryGroupClause queryGroupClause)
793    {
794      Visit(EnterQueryGroupClause, LeaveQueryGroupClause, queryGroupClause);
795    }
796   
797    public event Action<AsExpression> EnterAsExpression, LeaveAsExpression;
798   
799    void IAstVisitor.VisitAsExpression(AsExpression asExpression)
800    {
801      Visit(EnterAsExpression, LeaveAsExpression, asExpression);
802    }
803   
804    public event Action<IsExpression> EnterIsExpression, LeaveIsExpression;
805   
806    void IAstVisitor.VisitIsExpression(IsExpression isExpression)
807    {
808      Visit(EnterIsExpression, LeaveIsExpression, isExpression);
809    }
810   
811    public event Action<DefaultValueExpression> EnterDefaultValueExpression, LeaveDefaultValueExpression;
812   
813    void IAstVisitor.VisitDefaultValueExpression(DefaultValueExpression defaultValueExpression)
814    {
815      Visit(EnterDefaultValueExpression, LeaveDefaultValueExpression, defaultValueExpression);
816    }
817   
818    public event Action<UndocumentedExpression> EnterUndocumentedExpression, LeaveUndocumentedExpression;
819   
820    void IAstVisitor.VisitUndocumentedExpression(UndocumentedExpression undocumentedExpression)
821    {
822      Visit(EnterUndocumentedExpression, LeaveUndocumentedExpression, undocumentedExpression);
823    }
824   
825    public event Action<ArrayInitializerExpression> EnterArrayInitializerExpression, LeaveArrayInitializerExpression;
826   
827    void IAstVisitor.VisitArrayInitializerExpression(ArrayInitializerExpression arrayInitializerExpression)
828    {
829      Visit(EnterArrayInitializerExpression, LeaveArrayInitializerExpression, arrayInitializerExpression);
830    }
831   
832    public event Action<ArraySpecifier> EnterArraySpecifier, LeaveArraySpecifier;
833   
834    void IAstVisitor.VisitArraySpecifier(ArraySpecifier arraySpecifier)
835    {
836      Visit(EnterArraySpecifier, LeaveArraySpecifier, arraySpecifier);
837    }
838   
839    public event Action<NamedArgumentExpression> EnterNamedArgumentExpression, LeaveNamedArgumentExpression;
840   
841    void IAstVisitor.VisitNamedArgumentExpression(NamedArgumentExpression namedArgumentExpression)
842    {
843      Visit(EnterNamedArgumentExpression, LeaveNamedArgumentExpression, namedArgumentExpression);
844    }
845   
846    public event Action<NamedExpression> EnterNamedExpression, LeaveNamedExpression;
847   
848    void IAstVisitor.VisitNamedExpression(NamedExpression namedExpression)
849    {
850      Visit(EnterNamedExpression, LeaveNamedExpression, namedExpression);
851    }
852   
853    void IAstVisitor.VisitPatternPlaceholder(AstNode placeholder, PatternMatching.Pattern pattern)
854    {
855    }
856  }
857}
Note: See TracBrowser for help on using the repository browser.