@ -322,38 +322,38 @@ namespace ICSharpCode.NRefactory.Parser {
public virtual object Visit ( ConstructorDeclaration constructorDeclaration , object data ) {
public virtual object Visit ( ConstructorDeclaration constructorDeclaration , object data ) {
Debug . Assert ( ( constructorDeclaration ! = null ) ) ;
Debug . Assert ( ( constructorDeclaration ! = null ) ) ;
Debug . Assert ( ( constructorDeclaration . Attributes ! = null ) ) ;
Debug . Assert ( ( constructorDeclaration . Parameters ! = null ) ) ;
Debug . Assert ( ( constructorDeclaration . ConstructorInitializer ! = null ) ) ;
Debug . Assert ( ( constructorDeclaration . ConstructorInitializer ! = null ) ) ;
Debug . Assert ( ( constructorDeclaration . Body ! = null ) ) ;
Debug . Assert ( ( constructorDeclaration . Body ! = null ) ) ;
Debug . Assert ( ( constructorDeclaration . Parameters ! = null ) ) ;
for ( int i = 0 ; i < constructorDeclaration . Attributes . Count ; i + + ) {
Debug . Assert ( ( constructorDeclaration . Attributes ! = null ) ) ;
AttributeSection o = constructorDeclaration . Attributes [ i ] ;
nodeStack . Push ( constructorDeclaration . ConstructorInitializer ) ;
constructorDeclaration . ConstructorInitializer . AcceptVisitor ( this , data ) ;
constructorDeclaration . ConstructorInitializer = ( ( ConstructorInitializer ) ( nodeStack . Pop ( ) ) ) ;
nodeStack . Push ( constructorDeclaration . Body ) ;
constructorDeclaration . Body . AcceptVisitor ( this , data ) ;
constructorDeclaration . Body = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
for ( int i = 0 ; i < constructorDeclaration . Parameters . Count ; i + + ) {
ParameterDeclarationExpression o = constructorDeclaration . Parameters [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( ParameterDeclarationExpress ion) nodeStack . Pop ( ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
constructorDeclaration . Parameter s. RemoveAt ( i - - ) ;
constructorDeclaration . Attributes . RemoveAt ( i - - ) ;
else
else
constructorDeclaration . Parameter s[ i ] = o ;
constructorDeclaration . Attributes [ i ] = o ;
}
}
for ( int i = 0 ; i < constructorDeclaration . Attribute s. Count ; i + + ) {
for ( int i = 0 ; i < constructorDeclaration . Parameter s. Count ; i + + ) {
AttributeSect ion o = constructorDeclaration . Attribute s[ i ] ;
ParameterDeclarationExpress ion o = constructorDeclaration . Parameter s[ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSect ion) nodeStack . Pop ( ) ;
o = ( ParameterDeclarationExpress ion) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
constructorDeclaration . Attribute s. RemoveAt ( i - - ) ;
constructorDeclaration . Parameter s. RemoveAt ( i - - ) ;
else
else
constructorDeclaration . Attribute s[ i ] = o ;
constructorDeclaration . Parameter s[ i ] = o ;
}
}
nodeStack . Push ( constructorDeclaration . ConstructorInitializer ) ;
constructorDeclaration . ConstructorInitializer . AcceptVisitor ( this , data ) ;
constructorDeclaration . ConstructorInitializer = ( ( ConstructorInitializer ) ( nodeStack . Pop ( ) ) ) ;
nodeStack . Push ( constructorDeclaration . Body ) ;
constructorDeclaration . Body . AcceptVisitor ( this , data ) ;
constructorDeclaration . Body = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
return null ;
return null ;
}
}
@ -381,34 +381,34 @@ namespace ICSharpCode.NRefactory.Parser {
public virtual object Visit ( DeclareDeclaration declareDeclaration , object data ) {
public virtual object Visit ( DeclareDeclaration declareDeclaration , object data ) {
Debug . Assert ( ( declareDeclaration ! = null ) ) ;
Debug . Assert ( ( declareDeclaration ! = null ) ) ;
Debug . Assert ( ( declareDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( declareDeclaration . Parameters ! = null ) ) ;
Debug . Assert ( ( declareDeclaration . Attributes ! = null ) ) ;
Debug . Assert ( ( declareDeclaration . Attributes ! = null ) ) ;
nodeStack . Push ( declareDeclaration . TypeReference ) ;
Debug . Assert ( ( declareDeclaration . Parameters ! = null ) ) ;
declareDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
Debug . Assert ( ( declareDeclaration . TypeReference ! = null ) ) ;
declareDeclaration . TypeReference = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
for ( int i = 0 ; i < declareDeclaration . Attributes . Count ; i + + ) {
for ( int i = 0 ; i < declareDeclaration . Parameters . Count ; i + + ) {
AttributeSection o = declareDeclaration . Attributes [ i ] ;
ParameterDeclarationExpression o = declareDeclaration . Parameters [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( ParameterDeclarationExpress ion) nodeStack . Pop ( ) ;
o = ( AttributeSect ion) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
declareDeclaration . Parameter s. RemoveAt ( i - - ) ;
declareDeclaration . Attribute s. RemoveAt ( i - - ) ;
else
else
declareDeclaration . Parameter s[ i ] = o ;
declareDeclaration . Attribute s[ i ] = o ;
}
}
for ( int i = 0 ; i < declareDeclaration . Attribute s. Count ; i + + ) {
for ( int i = 0 ; i < declareDeclaration . Parameter s. Count ; i + + ) {
AttributeSect ion o = declareDeclaration . Attribute s[ i ] ;
ParameterDeclarationExpress ion o = declareDeclaration . Parameter s[ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSect ion) nodeStack . Pop ( ) ;
o = ( ParameterDeclarationExpress ion) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
declareDeclaration . Attribute s. RemoveAt ( i - - ) ;
declareDeclaration . Parameter s. RemoveAt ( i - - ) ;
else
else
declareDeclaration . Attribute s[ i ] = o ;
declareDeclaration . Parameter s[ i ] = o ;
}
}
nodeStack . Push ( declareDeclaration . TypeReference ) ;
declareDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
declareDeclaration . TypeReference = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
return null ;
return null ;
}
}
@ -423,10 +423,21 @@ namespace ICSharpCode.NRefactory.Parser {
public virtual object Visit ( DelegateDeclaration delegateDeclaration , object data ) {
public virtual object Visit ( DelegateDeclaration delegateDeclaration , object data ) {
Debug . Assert ( ( delegateDeclaration ! = null ) ) ;
Debug . Assert ( ( delegateDeclaration ! = null ) ) ;
Debug . Assert ( ( delegateDeclaration . Attributes ! = null ) ) ;
Debug . Assert ( ( delegateDeclaration . ReturnType ! = null ) ) ;
Debug . Assert ( ( delegateDeclaration . ReturnType ! = null ) ) ;
Debug . Assert ( ( delegateDeclaration . Parameters ! = null ) ) ;
Debug . Assert ( ( delegateDeclaration . Parameters ! = null ) ) ;
Debug . Assert ( ( delegateDeclaration . Templates ! = null ) ) ;
Debug . Assert ( ( delegateDeclaration . Templates ! = null ) ) ;
Debug . Assert ( ( delegateDeclaration . Attributes ! = null ) ) ;
for ( int i = 0 ; i < delegateDeclaration . Attributes . Count ; i + + ) {
AttributeSection o = delegateDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
delegateDeclaration . Attributes . RemoveAt ( i - - ) ;
else
delegateDeclaration . Attributes [ i ] = o ;
}
nodeStack . Push ( delegateDeclaration . ReturnType ) ;
nodeStack . Push ( delegateDeclaration . ReturnType ) ;
delegateDeclaration . ReturnType . AcceptVisitor ( this , data ) ;
delegateDeclaration . ReturnType . AcceptVisitor ( this , data ) ;
delegateDeclaration . ReturnType = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
delegateDeclaration . ReturnType = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
@ -452,27 +463,13 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
delegateDeclaration . Templates [ i ] = o ;
delegateDeclaration . Templates [ i ] = o ;
}
}
for ( int i = 0 ; i < delegateDeclaration . Attributes . Count ; i + + ) {
AttributeSection o = delegateDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
delegateDeclaration . Attributes . RemoveAt ( i - - ) ;
else
delegateDeclaration . Attributes [ i ] = o ;
}
return null ;
return null ;
}
}
public virtual object Visit ( DestructorDeclaration destructorDeclaration , object data ) {
public virtual object Visit ( DestructorDeclaration destructorDeclaration , object data ) {
Debug . Assert ( ( destructorDeclaration ! = null ) ) ;
Debug . Assert ( ( destructorDeclaration ! = null ) ) ;
Debug . Assert ( ( destructorDeclaration . Body ! = null ) ) ;
Debug . Assert ( ( destructorDeclaration . Attributes ! = null ) ) ;
Debug . Assert ( ( destructorDeclaration . Attributes ! = null ) ) ;
nodeStack . Push ( destructorDeclaration . Body ) ;
Debug . Assert ( ( destructorDeclaration . Body ! = null ) ) ;
destructorDeclaration . Body . AcceptVisitor ( this , data ) ;
destructorDeclaration . Body = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
for ( int i = 0 ; i < destructorDeclaration . Attributes . Count ; i + + ) {
for ( int i = 0 ; i < destructorDeclaration . Attributes . Count ; i + + ) {
AttributeSection o = destructorDeclaration . Attributes [ i ] ;
AttributeSection o = destructorDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
@ -484,6 +481,9 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
destructorDeclaration . Attributes [ i ] = o ;
destructorDeclaration . Attributes [ i ] = o ;
}
}
nodeStack . Push ( destructorDeclaration . Body ) ;
destructorDeclaration . Body . AcceptVisitor ( this , data ) ;
destructorDeclaration . Body = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
return null ;
return null ;
}
}
@ -560,9 +560,20 @@ namespace ICSharpCode.NRefactory.Parser {
public virtual object Visit ( EventAddRegion eventAddRegion , object data ) {
public virtual object Visit ( EventAddRegion eventAddRegion , object data ) {
Debug . Assert ( ( eventAddRegion ! = null ) ) ;
Debug . Assert ( ( eventAddRegion ! = null ) ) ;
Debug . Assert ( ( eventAddRegion . Attributes ! = null ) ) ;
Debug . Assert ( ( eventAddRegion . Block ! = null ) ) ;
Debug . Assert ( ( eventAddRegion . Block ! = null ) ) ;
Debug . Assert ( ( eventAddRegion . Parameters ! = null ) ) ;
Debug . Assert ( ( eventAddRegion . Parameters ! = null ) ) ;
Debug . Assert ( ( eventAddRegion . Attributes ! = null ) ) ;
for ( int i = 0 ; i < eventAddRegion . Attributes . Count ; i + + ) {
AttributeSection o = eventAddRegion . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
eventAddRegion . Attributes . RemoveAt ( i - - ) ;
else
eventAddRegion . Attributes [ i ] = o ;
}
nodeStack . Push ( eventAddRegion . Block ) ;
nodeStack . Push ( eventAddRegion . Block ) ;
eventAddRegion . Block . AcceptVisitor ( this , data ) ;
eventAddRegion . Block . AcceptVisitor ( this , data ) ;
eventAddRegion . Block = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
eventAddRegion . Block = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
@ -577,52 +588,29 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
eventAddRegion . Parameters [ i ] = o ;
eventAddRegion . Parameters [ i ] = o ;
}
}
for ( int i = 0 ; i < eventAddRegion . Attributes . Count ; i + + ) {
AttributeSection o = eventAddRegion . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
eventAddRegion . Attributes . RemoveAt ( i - - ) ;
else
eventAddRegion . Attributes [ i ] = o ;
}
return null ;
return null ;
}
}
public virtual object Visit ( EventDeclaration eventDeclaration , object data ) {
public virtual object Visit ( EventDeclaration eventDeclaration , object data ) {
Debug . Assert ( ( eventDeclaration ! = null ) ) ;
Debug . Assert ( ( eventDeclaration ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . Attributes ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . Parameters ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . InterfaceImplementations ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . InterfaceImplementations ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . AddRegion ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . AddRegion ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . RemoveRegion ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . RemoveRegion ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . RaiseRegion ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . RaiseRegion ! = null ) ) ;
Debug . Assert ( ( eventDeclaration . Parameters ! = null ) ) ;
for ( int i = 0 ; i < eventDeclaration . Attributes . Count ; i + + ) {
Debug . Assert ( ( eventDeclaration . Attributes ! = null ) ) ;
AttributeSection o = eventDeclaration . Attributes [ i ] ;
nodeStack . Push ( eventDeclaration . TypeReference ) ;
eventDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
eventDeclaration . TypeReference = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
for ( int i = 0 ; i < eventDeclaration . InterfaceImplementations . Count ; i + + ) {
InterfaceImplementation o = eventDeclaration . InterfaceImplementations [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( InterfaceImplementa tion) nodeStack . Pop ( ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
eventDeclaration . InterfaceImplementation s. RemoveAt ( i - - ) ;
eventDeclaration . Attribute s. RemoveAt ( i - - ) ;
else
else
eventDeclaration . InterfaceImplementation s[ i ] = o ;
eventDeclaration . Attribute s[ i ] = o ;
}
}
nodeStack . Push ( eventDeclaration . AddRegion ) ;
eventDeclaration . AddRegion . AcceptVisitor ( this , data ) ;
eventDeclaration . AddRegion = ( ( EventAddRegion ) ( nodeStack . Pop ( ) ) ) ;
nodeStack . Push ( eventDeclaration . RemoveRegion ) ;
eventDeclaration . RemoveRegion . AcceptVisitor ( this , data ) ;
eventDeclaration . RemoveRegion = ( ( EventRemoveRegion ) ( nodeStack . Pop ( ) ) ) ;
nodeStack . Push ( eventDeclaration . RaiseRegion ) ;
eventDeclaration . RaiseRegion . AcceptVisitor ( this , data ) ;
eventDeclaration . RaiseRegion = ( ( EventRaiseRegion ) ( nodeStack . Pop ( ) ) ) ;
for ( int i = 0 ; i < eventDeclaration . Parameters . Count ; i + + ) {
for ( int i = 0 ; i < eventDeclaration . Parameters . Count ; i + + ) {
ParameterDeclarationExpression o = eventDeclaration . Parameters [ i ] ;
ParameterDeclarationExpression o = eventDeclaration . Parameters [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
@ -634,25 +622,48 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
eventDeclaration . Parameters [ i ] = o ;
eventDeclaration . Parameters [ i ] = o ;
}
}
for ( int i = 0 ; i < eventDeclaration . Attributes . Count ; i + + ) {
nodeStack . Push ( eventDeclaration . TypeReference ) ;
AttributeSection o = eventDeclaration . Attributes [ i ] ;
eventDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
eventDeclaration . TypeReference = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
for ( int i = 0 ; i < eventDeclaration . InterfaceImplementations . Count ; i + + ) {
InterfaceImplementation o = eventDeclaration . InterfaceImplementations [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSec tion) nodeStack . Pop ( ) ;
o = ( InterfaceImplementa tion) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
eventDeclaration . Attribute s. RemoveAt ( i - - ) ;
eventDeclaration . InterfaceImplementation s. RemoveAt ( i - - ) ;
else
else
eventDeclaration . Attribute s[ i ] = o ;
eventDeclaration . InterfaceImplementation s[ i ] = o ;
}
}
nodeStack . Push ( eventDeclaration . AddRegion ) ;
eventDeclaration . AddRegion . AcceptVisitor ( this , data ) ;
eventDeclaration . AddRegion = ( ( EventAddRegion ) ( nodeStack . Pop ( ) ) ) ;
nodeStack . Push ( eventDeclaration . RemoveRegion ) ;
eventDeclaration . RemoveRegion . AcceptVisitor ( this , data ) ;
eventDeclaration . RemoveRegion = ( ( EventRemoveRegion ) ( nodeStack . Pop ( ) ) ) ;
nodeStack . Push ( eventDeclaration . RaiseRegion ) ;
eventDeclaration . RaiseRegion . AcceptVisitor ( this , data ) ;
eventDeclaration . RaiseRegion = ( ( EventRaiseRegion ) ( nodeStack . Pop ( ) ) ) ;
return null ;
return null ;
}
}
public virtual object Visit ( EventRaiseRegion eventRaiseRegion , object data ) {
public virtual object Visit ( EventRaiseRegion eventRaiseRegion , object data ) {
Debug . Assert ( ( eventRaiseRegion ! = null ) ) ;
Debug . Assert ( ( eventRaiseRegion ! = null ) ) ;
Debug . Assert ( ( eventRaiseRegion . Attributes ! = null ) ) ;
Debug . Assert ( ( eventRaiseRegion . Block ! = null ) ) ;
Debug . Assert ( ( eventRaiseRegion . Block ! = null ) ) ;
Debug . Assert ( ( eventRaiseRegion . Parameters ! = null ) ) ;
Debug . Assert ( ( eventRaiseRegion . Parameters ! = null ) ) ;
Debug . Assert ( ( eventRaiseRegion . Attributes ! = null ) ) ;
for ( int i = 0 ; i < eventRaiseRegion . Attributes . Count ; i + + ) {
AttributeSection o = eventRaiseRegion . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
eventRaiseRegion . Attributes . RemoveAt ( i - - ) ;
else
eventRaiseRegion . Attributes [ i ] = o ;
}
nodeStack . Push ( eventRaiseRegion . Block ) ;
nodeStack . Push ( eventRaiseRegion . Block ) ;
eventRaiseRegion . Block . AcceptVisitor ( this , data ) ;
eventRaiseRegion . Block . AcceptVisitor ( this , data ) ;
eventRaiseRegion . Block = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
eventRaiseRegion . Block = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
@ -667,25 +678,25 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
eventRaiseRegion . Parameters [ i ] = o ;
eventRaiseRegion . Parameters [ i ] = o ;
}
}
for ( int i = 0 ; i < eventRaiseRegion . Attributes . Count ; i + + ) {
AttributeSection o = eventRaiseRegion . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
eventRaiseRegion . Attributes . RemoveAt ( i - - ) ;
else
eventRaiseRegion . Attributes [ i ] = o ;
}
return null ;
return null ;
}
}
public virtual object Visit ( EventRemoveRegion eventRemoveRegion , object data ) {
public virtual object Visit ( EventRemoveRegion eventRemoveRegion , object data ) {
Debug . Assert ( ( eventRemoveRegion ! = null ) ) ;
Debug . Assert ( ( eventRemoveRegion ! = null ) ) ;
Debug . Assert ( ( eventRemoveRegion . Attributes ! = null ) ) ;
Debug . Assert ( ( eventRemoveRegion . Block ! = null ) ) ;
Debug . Assert ( ( eventRemoveRegion . Block ! = null ) ) ;
Debug . Assert ( ( eventRemoveRegion . Parameters ! = null ) ) ;
Debug . Assert ( ( eventRemoveRegion . Parameters ! = null ) ) ;
Debug . Assert ( ( eventRemoveRegion . Attributes ! = null ) ) ;
for ( int i = 0 ; i < eventRemoveRegion . Attributes . Count ; i + + ) {
AttributeSection o = eventRemoveRegion . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
eventRemoveRegion . Attributes . RemoveAt ( i - - ) ;
else
eventRemoveRegion . Attributes [ i ] = o ;
}
nodeStack . Push ( eventRemoveRegion . Block ) ;
nodeStack . Push ( eventRemoveRegion . Block ) ;
eventRemoveRegion . Block . AcceptVisitor ( this , data ) ;
eventRemoveRegion . Block . AcceptVisitor ( this , data ) ;
eventRemoveRegion . Block = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
eventRemoveRegion . Block = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
@ -700,17 +711,6 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
eventRemoveRegion . Parameters [ i ] = o ;
eventRemoveRegion . Parameters [ i ] = o ;
}
}
for ( int i = 0 ; i < eventRemoveRegion . Attributes . Count ; i + + ) {
AttributeSection o = eventRemoveRegion . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
eventRemoveRegion . Attributes . RemoveAt ( i - - ) ;
else
eventRemoveRegion . Attributes [ i ] = o ;
}
return null ;
return null ;
}
}
@ -721,9 +721,20 @@ namespace ICSharpCode.NRefactory.Parser {
public virtual object Visit ( FieldDeclaration fieldDeclaration , object data ) {
public virtual object Visit ( FieldDeclaration fieldDeclaration , object data ) {
Debug . Assert ( ( fieldDeclaration ! = null ) ) ;
Debug . Assert ( ( fieldDeclaration ! = null ) ) ;
Debug . Assert ( ( fieldDeclaration . Attributes ! = null ) ) ;
Debug . Assert ( ( fieldDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( fieldDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( fieldDeclaration . Fields ! = null ) ) ;
Debug . Assert ( ( fieldDeclaration . Fields ! = null ) ) ;
Debug . Assert ( ( fieldDeclaration . Attributes ! = null ) ) ;
for ( int i = 0 ; i < fieldDeclaration . Attributes . Count ; i + + ) {
AttributeSection o = fieldDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
fieldDeclaration . Attributes . RemoveAt ( i - - ) ;
else
fieldDeclaration . Attributes [ i ] = o ;
}
nodeStack . Push ( fieldDeclaration . TypeReference ) ;
nodeStack . Push ( fieldDeclaration . TypeReference ) ;
fieldDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
fieldDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
fieldDeclaration . TypeReference = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
fieldDeclaration . TypeReference = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
@ -738,17 +749,6 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
fieldDeclaration . Fields [ i ] = o ;
fieldDeclaration . Fields [ i ] = o ;
}
}
for ( int i = 0 ; i < fieldDeclaration . Attributes . Count ; i + + ) {
AttributeSection o = fieldDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
fieldDeclaration . Attributes . RemoveAt ( i - - ) ;
else
fieldDeclaration . Attributes [ i ] = o ;
}
return null ;
return null ;
}
}
@ -947,12 +947,23 @@ namespace ICSharpCode.NRefactory.Parser {
public virtual object Visit ( IndexerDeclaration indexerDeclaration , object data ) {
public virtual object Visit ( IndexerDeclaration indexerDeclaration , object data ) {
Debug . Assert ( ( indexerDeclaration ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . Attributes ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . Parameters ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . Parameters ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . InterfaceImplementations ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . InterfaceImplementations ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . GetRegion ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . GetRegion ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . SetRegion ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . SetRegion ! = null ) ) ;
Debug . Assert ( ( indexerDeclaration . Attributes ! = null ) ) ;
for ( int i = 0 ; i < indexerDeclaration . Attributes . Count ; i + + ) {
AttributeSection o = indexerDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
indexerDeclaration . Attributes . RemoveAt ( i - - ) ;
else
indexerDeclaration . Attributes [ i ] = o ;
}
for ( int i = 0 ; i < indexerDeclaration . Parameters . Count ; i + + ) {
for ( int i = 0 ; i < indexerDeclaration . Parameters . Count ; i + + ) {
ParameterDeclarationExpression o = indexerDeclaration . Parameters [ i ] ;
ParameterDeclarationExpression o = indexerDeclaration . Parameters [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
@ -984,17 +995,6 @@ namespace ICSharpCode.NRefactory.Parser {
nodeStack . Push ( indexerDeclaration . SetRegion ) ;
nodeStack . Push ( indexerDeclaration . SetRegion ) ;
indexerDeclaration . SetRegion . AcceptVisitor ( this , data ) ;
indexerDeclaration . SetRegion . AcceptVisitor ( this , data ) ;
indexerDeclaration . SetRegion = ( ( PropertySetRegion ) ( nodeStack . Pop ( ) ) ) ;
indexerDeclaration . SetRegion = ( ( PropertySetRegion ) ( nodeStack . Pop ( ) ) ) ;
for ( int i = 0 ; i < indexerDeclaration . Attributes . Count ; i + + ) {
AttributeSection o = indexerDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
indexerDeclaration . Attributes . RemoveAt ( i - - ) ;
else
indexerDeclaration . Attributes [ i ] = o ;
}
return null ;
return null ;
}
}
@ -1107,12 +1107,34 @@ namespace ICSharpCode.NRefactory.Parser {
public virtual object Visit ( MethodDeclaration methodDeclaration , object data ) {
public virtual object Visit ( MethodDeclaration methodDeclaration , object data ) {
Debug . Assert ( ( methodDeclaration ! = null ) ) ;
Debug . Assert ( ( methodDeclaration ! = null ) ) ;
Debug . Assert ( ( methodDeclaration . Attributes ! = null ) ) ;
Debug . Assert ( ( methodDeclaration . Parameters ! = null ) ) ;
Debug . Assert ( ( methodDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( methodDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( methodDeclaration . Body ! = null ) ) ;
Debug . Assert ( ( methodDeclaration . Body ! = null ) ) ;
Debug . Assert ( ( methodDeclaration . InterfaceImplementations ! = null ) ) ;
Debug . Assert ( ( methodDeclaration . InterfaceImplementations ! = null ) ) ;
Debug . Assert ( ( methodDeclaration . Templates ! = null ) ) ;
Debug . Assert ( ( methodDeclaration . Templates ! = null ) ) ;
Debug . Assert ( ( methodDeclaration . Parameters ! = null ) ) ;
for ( int i = 0 ; i < methodDeclaration . Attributes . Count ; i + + ) {
Debug . Assert ( ( methodDeclaration . Attributes ! = null ) ) ;
AttributeSection o = methodDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
methodDeclaration . Attributes . RemoveAt ( i - - ) ;
else
methodDeclaration . Attributes [ i ] = o ;
}
for ( int i = 0 ; i < methodDeclaration . Parameters . Count ; i + + ) {
ParameterDeclarationExpression o = methodDeclaration . Parameters [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( ParameterDeclarationExpression ) nodeStack . Pop ( ) ;
if ( o = = null )
methodDeclaration . Parameters . RemoveAt ( i - - ) ;
else
methodDeclaration . Parameters [ i ] = o ;
}
nodeStack . Push ( methodDeclaration . TypeReference ) ;
nodeStack . Push ( methodDeclaration . TypeReference ) ;
methodDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
methodDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
methodDeclaration . TypeReference = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
methodDeclaration . TypeReference = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
@ -1141,28 +1163,6 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
methodDeclaration . Templates [ i ] = o ;
methodDeclaration . Templates [ i ] = o ;
}
}
for ( int i = 0 ; i < methodDeclaration . Parameters . Count ; i + + ) {
ParameterDeclarationExpression o = methodDeclaration . Parameters [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( ParameterDeclarationExpression ) nodeStack . Pop ( ) ;
if ( o = = null )
methodDeclaration . Parameters . RemoveAt ( i - - ) ;
else
methodDeclaration . Parameters [ i ] = o ;
}
for ( int i = 0 ; i < methodDeclaration . Attributes . Count ; i + + ) {
AttributeSection o = methodDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
methodDeclaration . Attributes . RemoveAt ( i - - ) ;
else
methodDeclaration . Attributes [ i ] = o ;
}
return null ;
return null ;
}
}
@ -1223,23 +1223,34 @@ namespace ICSharpCode.NRefactory.Parser {
public virtual object Visit ( OperatorDeclaration operatorDeclaration , object data ) {
public virtual object Visit ( OperatorDeclaration operatorDeclaration , object data ) {
Debug . Assert ( ( operatorDeclaration ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . ReturnTypeAttributes ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . Attributes ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . Parameters ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . Body ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . Body ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . InterfaceImplementations ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . InterfaceImplementations ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . Templates ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . Templates ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . Parameters ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . ReturnTypeAttributes ! = null ) ) ;
Debug . Assert ( ( operatorDeclaration . Attributes ! = null ) ) ;
for ( int i = 0 ; i < operatorDeclaration . Attributes . Count ; i + + ) {
for ( int i = 0 ; i < operatorDeclaration . ReturnTypeAttributes . Count ; i + + ) {
AttributeSection o = operatorDeclaration . Attributes [ i ] ;
AttributeSection o = operatorDeclaration . ReturnTypeAttributes [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
operatorDeclaration . ReturnType Attributes. RemoveAt ( i - - ) ;
operatorDeclaration . Attributes . RemoveAt ( i - - ) ;
else
else
operatorDeclaration . ReturnTypeAttributes [ i ] = o ;
operatorDeclaration . Attributes [ i ] = o ;
}
for ( int i = 0 ; i < operatorDeclaration . Parameters . Count ; i + + ) {
ParameterDeclarationExpression o = operatorDeclaration . Parameters [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( ParameterDeclarationExpression ) nodeStack . Pop ( ) ;
if ( o = = null )
operatorDeclaration . Parameters . RemoveAt ( i - - ) ;
else
operatorDeclaration . Parameters [ i ] = o ;
}
}
nodeStack . Push ( operatorDeclaration . TypeReference ) ;
nodeStack . Push ( operatorDeclaration . TypeReference ) ;
operatorDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
operatorDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
@ -1269,27 +1280,16 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
operatorDeclaration . Templates [ i ] = o ;
operatorDeclaration . Templates [ i ] = o ;
}
}
for ( int i = 0 ; i < operatorDeclaration . Parameters . Count ; i + + ) {
for ( int i = 0 ; i < operatorDeclaration . ReturnTypeAttributes . Count ; i + + ) {
ParameterDeclarationExpression o = operatorDeclaration . Parameters [ i ] ;
AttributeSection o = operatorDeclaration . ReturnTypeAttributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( ParameterDeclarationExpression ) nodeStack . Pop ( ) ;
if ( o = = null )
operatorDeclaration . Parameters . RemoveAt ( i - - ) ;
else
operatorDeclaration . Parameters [ i ] = o ;
}
for ( int i = 0 ; i < operatorDeclaration . Attributes . Count ; i + + ) {
AttributeSection o = operatorDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
operatorDeclaration . Attributes . RemoveAt ( i - - ) ;
operatorDeclaration . ReturnTypeAttributes . RemoveAt ( i - - ) ;
else
else
operatorDeclaration . Attributes [ i ] = o ;
operatorDeclaration . ReturnTypeAttributes [ i ] = o ;
}
}
return null ;
return null ;
}
}
@ -1349,32 +1349,23 @@ namespace ICSharpCode.NRefactory.Parser {
public virtual object Visit ( PropertyDeclaration propertyDeclaration , object data ) {
public virtual object Visit ( PropertyDeclaration propertyDeclaration , object data ) {
Debug . Assert ( ( propertyDeclaration ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration . Attributes ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration . Parameters ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration . InterfaceImplementations ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration . InterfaceImplementations ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration . TypeReference ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration . GetRegion ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration . GetRegion ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration . SetRegion ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration . SetRegion ! = null ) ) ;
Debug . Assert ( ( propertyDeclaration . Parameters ! = null ) ) ;
for ( int i = 0 ; i < propertyDeclaration . Attributes . Count ; i + + ) {
Debug . Assert ( ( propertyDeclaration . Attributes ! = null ) ) ;
AttributeSection o = propertyDeclaration . Attributes [ i ] ;
for ( int i = 0 ; i < propertyDeclaration . InterfaceImplementations . Count ; i + + ) {
InterfaceImplementation o = propertyDeclaration . InterfaceImplementations [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( InterfaceImplementa tion) nodeStack . Pop ( ) ;
o = ( AttributeSec tion) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
propertyDeclaration . InterfaceImplementation s. RemoveAt ( i - - ) ;
propertyDeclaration . Attribute s. RemoveAt ( i - - ) ;
else
else
propertyDeclaration . InterfaceImplementation s[ i ] = o ;
propertyDeclaration . Attribute s[ i ] = o ;
}
}
nodeStack . Push ( propertyDeclaration . TypeReference ) ;
propertyDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
propertyDeclaration . TypeReference = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
nodeStack . Push ( propertyDeclaration . GetRegion ) ;
propertyDeclaration . GetRegion . AcceptVisitor ( this , data ) ;
propertyDeclaration . GetRegion = ( ( PropertyGetRegion ) ( nodeStack . Pop ( ) ) ) ;
nodeStack . Push ( propertyDeclaration . SetRegion ) ;
propertyDeclaration . SetRegion . AcceptVisitor ( this , data ) ;
propertyDeclaration . SetRegion = ( ( PropertySetRegion ) ( nodeStack . Pop ( ) ) ) ;
for ( int i = 0 ; i < propertyDeclaration . Parameters . Count ; i + + ) {
for ( int i = 0 ; i < propertyDeclaration . Parameters . Count ; i + + ) {
ParameterDeclarationExpression o = propertyDeclaration . Parameters [ i ] ;
ParameterDeclarationExpression o = propertyDeclaration . Parameters [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
@ -1386,27 +1377,33 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
propertyDeclaration . Parameters [ i ] = o ;
propertyDeclaration . Parameters [ i ] = o ;
}
}
for ( int i = 0 ; i < propertyDeclaration . Attribute s. Count ; i + + ) {
for ( int i = 0 ; i < propertyDeclaration . InterfaceImplementation s. Count ; i + + ) {
AttributeSec tion o = propertyDeclaration . Attribute s[ i ] ;
InterfaceImplementa tion o = propertyDeclaration . InterfaceImplementation s[ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSec tion) nodeStack . Pop ( ) ;
o = ( InterfaceImplementa tion) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
propertyDeclaration . Attribute s. RemoveAt ( i - - ) ;
propertyDeclaration . InterfaceImplementation s. RemoveAt ( i - - ) ;
else
else
propertyDeclaration . Attribute s[ i ] = o ;
propertyDeclaration . InterfaceImplementation s[ i ] = o ;
}
}
nodeStack . Push ( propertyDeclaration . TypeReference ) ;
propertyDeclaration . TypeReference . AcceptVisitor ( this , data ) ;
propertyDeclaration . TypeReference = ( ( TypeReference ) ( nodeStack . Pop ( ) ) ) ;
nodeStack . Push ( propertyDeclaration . GetRegion ) ;
propertyDeclaration . GetRegion . AcceptVisitor ( this , data ) ;
propertyDeclaration . GetRegion = ( ( PropertyGetRegion ) ( nodeStack . Pop ( ) ) ) ;
nodeStack . Push ( propertyDeclaration . SetRegion ) ;
propertyDeclaration . SetRegion . AcceptVisitor ( this , data ) ;
propertyDeclaration . SetRegion = ( ( PropertySetRegion ) ( nodeStack . Pop ( ) ) ) ;
return null ;
return null ;
}
}
public virtual object Visit ( PropertyGetRegion propertyGetRegion , object data ) {
public virtual object Visit ( PropertyGetRegion propertyGetRegion , object data ) {
Debug . Assert ( ( propertyGetRegion ! = null ) ) ;
Debug . Assert ( ( propertyGetRegion ! = null ) ) ;
Debug . Assert ( ( propertyGetRegion . Block ! = null ) ) ;
Debug . Assert ( ( propertyGetRegion . Attributes ! = null ) ) ;
Debug . Assert ( ( propertyGetRegion . Attributes ! = null ) ) ;
nodeStack . Push ( propertyGetRegion . Block ) ;
Debug . Assert ( ( propertyGetRegion . Block ! = null ) ) ;
propertyGetRegion . Block . AcceptVisitor ( this , data ) ;
propertyGetRegion . Block = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
for ( int i = 0 ; i < propertyGetRegion . Attributes . Count ; i + + ) {
for ( int i = 0 ; i < propertyGetRegion . Attributes . Count ; i + + ) {
AttributeSection o = propertyGetRegion . Attributes [ i ] ;
AttributeSection o = propertyGetRegion . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
@ -1418,38 +1415,41 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
propertyGetRegion . Attributes [ i ] = o ;
propertyGetRegion . Attributes [ i ] = o ;
}
}
nodeStack . Push ( propertyGetRegion . Block ) ;
propertyGetRegion . Block . AcceptVisitor ( this , data ) ;
propertyGetRegion . Block = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
return null ;
return null ;
}
}
public virtual object Visit ( PropertySetRegion propertySetRegion , object data ) {
public virtual object Visit ( PropertySetRegion propertySetRegion , object data ) {
Debug . Assert ( ( propertySetRegion ! = null ) ) ;
Debug . Assert ( ( propertySetRegion ! = null ) ) ;
Debug . Assert ( ( propertySetRegion . Parameters ! = null ) ) ;
Debug . Assert ( ( propertySetRegion . Block ! = null ) ) ;
Debug . Assert ( ( propertySetRegion . Attributes ! = null ) ) ;
Debug . Assert ( ( propertySetRegion . Attributes ! = null ) ) ;
for ( int i = 0 ; i < propertySetRegion . Parameters . Count ; i + + ) {
Debug . Assert ( ( propertySetRegion . Block ! = null ) ) ;
ParameterDeclarationExpression o = propertySetRegion . Parameters [ i ] ;
Debug . Assert ( ( propertySetRegion . Parameters ! = null ) ) ;
for ( int i = 0 ; i < propertySetRegion . Attributes . Count ; i + + ) {
AttributeSection o = propertySetRegion . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( ParameterDeclarationExpress ion) nodeStack . Pop ( ) ;
o = ( AttributeSect ion) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
propertySetRegion . Parameter s. RemoveAt ( i - - ) ;
propertySetRegion . Attribute s. RemoveAt ( i - - ) ;
else
else
propertySetRegion . Parameter s[ i ] = o ;
propertySetRegion . Attribute s[ i ] = o ;
}
}
nodeStack . Push ( propertySetRegion . Block ) ;
nodeStack . Push ( propertySetRegion . Block ) ;
propertySetRegion . Block . AcceptVisitor ( this , data ) ;
propertySetRegion . Block . AcceptVisitor ( this , data ) ;
propertySetRegion . Block = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
propertySetRegion . Block = ( ( BlockStatement ) ( nodeStack . Pop ( ) ) ) ;
for ( int i = 0 ; i < propertySetRegion . Attribute s. Count ; i + + ) {
for ( int i = 0 ; i < propertySetRegion . Parameter s. Count ; i + + ) {
AttributeSect ion o = propertySetRegion . Attribute s[ i ] ;
ParameterDeclarationExpress ion o = propertySetRegion . Parameter s[ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSect ion) nodeStack . Pop ( ) ;
o = ( ParameterDeclarationExpress ion) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
propertySetRegion . Attribute s. RemoveAt ( i - - ) ;
propertySetRegion . Parameter s. RemoveAt ( i - - ) ;
else
else
propertySetRegion . Attribute s[ i ] = o ;
propertySetRegion . Parameter s[ i ] = o ;
}
}
return null ;
return null ;
}
}
@ -1602,29 +1602,29 @@ namespace ICSharpCode.NRefactory.Parser {
public virtual object Visit ( TemplateDefinition templateDefinition , object data ) {
public virtual object Visit ( TemplateDefinition templateDefinition , object data ) {
Debug . Assert ( ( templateDefinition ! = null ) ) ;
Debug . Assert ( ( templateDefinition ! = null ) ) ;
Debug . Assert ( ( templateDefinition . Bases ! = null ) ) ;
Debug . Assert ( ( templateDefinition . Attributes ! = null ) ) ;
Debug . Assert ( ( templateDefinition . Attributes ! = null ) ) ;
for ( int i = 0 ; i < templateDefinition . Bases . Count ; i + + ) {
Debug . Assert ( ( templateDefinition . Bases ! = null ) ) ;
TypeReference o = templateDefinition . Bases [ i ] ;
for ( int i = 0 ; i < templateDefinition . Attributes . Count ; i + + ) {
AttributeSection o = templateDefinition . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( TypeReference ) nodeStack . Pop ( ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
templateDefinition . Bas es. RemoveAt ( i - - ) ;
templateDefinition . Attribut es. RemoveAt ( i - - ) ;
else
else
templateDefinition . Bas es[ i ] = o ;
templateDefinition . Attribut es[ i ] = o ;
}
}
for ( int i = 0 ; i < templateDefinition . Attribut es. Count ; i + + ) {
for ( int i = 0 ; i < templateDefinition . Bas es. Count ; i + + ) {
AttributeSection o = templateDefinition . Attribut es[ i ] ;
TypeReference o = templateDefinition . Bas es[ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
o = ( TypeReference ) nodeStack . Pop ( ) ;
if ( o = = null )
if ( o = = null )
templateDefinition . Attribut es. RemoveAt ( i - - ) ;
templateDefinition . Bas es. RemoveAt ( i - - ) ;
else
else
templateDefinition . Attribut es[ i ] = o ;
templateDefinition . Bas es[ i ] = o ;
}
}
return null ;
return null ;
}
}
@ -1670,9 +1670,20 @@ namespace ICSharpCode.NRefactory.Parser {
public virtual object Visit ( TypeDeclaration typeDeclaration , object data ) {
public virtual object Visit ( TypeDeclaration typeDeclaration , object data ) {
Debug . Assert ( ( typeDeclaration ! = null ) ) ;
Debug . Assert ( ( typeDeclaration ! = null ) ) ;
Debug . Assert ( ( typeDeclaration . Attributes ! = null ) ) ;
Debug . Assert ( ( typeDeclaration . BaseTypes ! = null ) ) ;
Debug . Assert ( ( typeDeclaration . BaseTypes ! = null ) ) ;
Debug . Assert ( ( typeDeclaration . Templates ! = null ) ) ;
Debug . Assert ( ( typeDeclaration . Templates ! = null ) ) ;
Debug . Assert ( ( typeDeclaration . Attributes ! = null ) ) ;
for ( int i = 0 ; i < typeDeclaration . Attributes . Count ; i + + ) {
AttributeSection o = typeDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
typeDeclaration . Attributes . RemoveAt ( i - - ) ;
else
typeDeclaration . Attributes [ i ] = o ;
}
for ( int i = 0 ; i < typeDeclaration . BaseTypes . Count ; i + + ) {
for ( int i = 0 ; i < typeDeclaration . BaseTypes . Count ; i + + ) {
TypeReference o = typeDeclaration . BaseTypes [ i ] ;
TypeReference o = typeDeclaration . BaseTypes [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;
@ -1695,17 +1706,6 @@ namespace ICSharpCode.NRefactory.Parser {
else
else
typeDeclaration . Templates [ i ] = o ;
typeDeclaration . Templates [ i ] = o ;
}
}
for ( int i = 0 ; i < typeDeclaration . Attributes . Count ; i + + ) {
AttributeSection o = typeDeclaration . Attributes [ i ] ;
Debug . Assert ( o ! = null ) ;
nodeStack . Push ( o ) ;
o . AcceptVisitor ( this , data ) ;
o = ( AttributeSection ) nodeStack . Pop ( ) ;
if ( o = = null )
typeDeclaration . Attributes . RemoveAt ( i - - ) ;
else
typeDeclaration . Attributes [ i ] = o ;
}
for ( int i = 0 ; i < typeDeclaration . Children . Count ; i + + ) {
for ( int i = 0 ; i < typeDeclaration . Children . Count ; i + + ) {
INode o = typeDeclaration . Children [ i ] ;
INode o = typeDeclaration . Children [ i ] ;
Debug . Assert ( o ! = null ) ;
Debug . Assert ( o ! = null ) ;