1
//// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
//// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
4
//using System.Collections.Generic;
6
//namespace ICSharpCode.NRefactory.VB.Ast {
7
// public class AddHandlerStatement : Statement {
9
// Expression eventExpression;
11
// Expression handlerExpression;
13
// public Expression EventExpression {
15
// return eventExpression;
18
// eventExpression = value ?? Expression.Null;
19
// if (!eventExpression.IsNull) eventExpression.Parent = this;
23
// public Expression HandlerExpression {
25
// return handlerExpression;
28
// handlerExpression = value ?? Expression.Null;
29
// if (!handlerExpression.IsNull) handlerExpression.Parent = this;
33
// public AddHandlerStatement(Expression eventExpression, Expression handlerExpression) {
34
// EventExpression = eventExpression;
35
// HandlerExpression = handlerExpression;
38
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
39
// return visitor.VisitAddHandlerStatement(this, data);
42
// public override string ToString() {
43
// return string.Format("[AddHandlerStatement EventExpression={0} HandlerExpression={1}]", EventExpression, HandlerExpression);
47
// public class AddressOfExpression : Expression {
49
// Expression expression;
51
// public Expression Expression {
56
// expression = value ?? Expression.Null;
57
// if (!expression.IsNull) expression.Parent = this;
61
// public AddressOfExpression(Expression expression) {
62
// Expression = expression;
65
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
66
// return visitor.VisitAddressOfExpression(this, data);
69
// public override string ToString() {
70
// return string.Format("[AddressOfExpression Expression={0}]", Expression);
74
// public class ArrayCreateExpression : Expression {
76
// TypeReference createType;
78
// List<Expression> arguments;
80
// CollectionInitializerExpression arrayInitializer;
82
// public TypeReference CreateType {
87
// createType = value ?? TypeReference.Null;
88
// if (!createType.IsNull) createType.Parent = this;
92
// public List<Expression> Arguments {
97
// arguments = value ?? new List<Expression>();
101
// public CollectionInitializerExpression ArrayInitializer {
103
// return arrayInitializer;
106
// arrayInitializer = value ?? CollectionInitializerExpression.Null;
107
// if (!arrayInitializer.IsNull) arrayInitializer.Parent = this;
111
// public ArrayCreateExpression(TypeReference createType) {
112
// CreateType = createType;
113
// arguments = new List<Expression>();
114
// arrayInitializer = CollectionInitializerExpression.Null;
117
// public ArrayCreateExpression(TypeReference createType, List<Expression> arguments) {
118
// CreateType = createType;
119
// Arguments = arguments;
120
// arrayInitializer = CollectionInitializerExpression.Null;
123
// public ArrayCreateExpression(TypeReference createType, CollectionInitializerExpression arrayInitializer) {
124
// CreateType = createType;
125
// ArrayInitializer = arrayInitializer;
126
// arguments = new List<Expression>();
129
// public bool IsImplicitlyTyped {
131
// return createType.IsNull || string.IsNullOrEmpty(createType.Type);
135
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
136
// return visitor.VisitArrayCreateExpression(this, data);
139
// public override string ToString() {
140
// return string.Format("[ArrayCreateExpression CreateType={0} Arguments={1} ArrayInitializer={2}]", CreateType, GetCollectionString(Arguments), ArrayInitializer);
144
// public class AssignmentExpression : Expression {
148
// AssignmentOperatorType op;
152
// public Expression Left {
157
// left = value ?? Expression.Null;
158
// if (!left.IsNull) left.Parent = this;
162
// public AssignmentOperatorType Op {
171
// public Expression Right {
176
// right = value ?? Expression.Null;
177
// if (!right.IsNull) right.Parent = this;
181
// public AssignmentExpression(Expression left, AssignmentOperatorType op, Expression right) {
187
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
188
// return visitor.VisitAssignmentExpression(this, data);
191
// public override string ToString() {
192
// return string.Format("[AssignmentExpression Left={0} Op={1} Right={2}]", Left, Op, Right);
196
// public abstract class AttributedNode : AbstractNode {
198
// List<AttributeSection> attributes;
200
// Modifiers modifier;
202
// public List<AttributeSection> Attributes {
204
// return attributes;
207
// attributes = value ?? new List<AttributeSection>();
211
// public Modifiers Modifier {
220
// protected AttributedNode() {
221
// attributes = new List<AttributeSection>();
224
// protected AttributedNode(List<AttributeSection> attributes) {
225
// Attributes = attributes;
228
// protected AttributedNode(Modifiers modifier, List<AttributeSection> attributes) {
229
// Modifier = modifier;
230
// Attributes = attributes;
234
// public class AttributeSection : AbstractNode {
236
// string attributeTarget;
238
// List<ICSharpCode.NRefactory.VB.Ast.Attribute> attributes;
240
// public string AttributeTarget {
242
// return attributeTarget;
245
// attributeTarget = value ?? "";
249
// public List<ICSharpCode.NRefactory.VB.Ast.Attribute> Attributes {
251
// return attributes;
254
// attributes = value ?? new List<Attribute>();
258
// public AttributeSection() {
259
// attributeTarget = "";
260
// attributes = new List<Attribute>();
263
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
264
// return visitor.VisitAttributeSection(this, data);
267
// public override string ToString() {
268
// return string.Format("[AttributeSection AttributeTarget={0} Attributes={1}]", AttributeTarget, GetCollectionString(Attributes));
272
// public class BaseReferenceExpression : Expression {
274
// public BaseReferenceExpression() {
277
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
278
// return visitor.VisitBaseReferenceExpression(this, data);
281
// public override string ToString() {
282
// return "[BaseReferenceExpression]";
286
// public class BinaryOperatorExpression : Expression {
290
// BinaryOperatorType op;
294
// public Expression Left {
299
// left = value ?? Expression.Null;
300
// if (!left.IsNull) left.Parent = this;
304
// public BinaryOperatorType Op {
313
// public Expression Right {
318
// right = value ?? Expression.Null;
319
// if (!right.IsNull) right.Parent = this;
323
// public BinaryOperatorExpression() {
324
// left = Expression.Null;
325
// right = Expression.Null;
328
// public BinaryOperatorExpression(Expression left, BinaryOperatorType op, Expression right) {
334
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
335
// return visitor.VisitBinaryOperatorExpression(this, data);
338
// public override string ToString() {
339
// return string.Format("[BinaryOperatorExpression Left={0} Op={1} Right={2}]", Left, Op, Right);
343
// public class CaseLabel : AbstractNode {
347
// BinaryOperatorType binaryOperatorType;
349
// Expression toExpression;
351
// public Expression Label {
356
// label = value ?? Expression.Null;
357
// if (!label.IsNull) label.Parent = this;
361
// public BinaryOperatorType BinaryOperatorType {
363
// return binaryOperatorType;
366
// binaryOperatorType = value;
370
// public Expression ToExpression {
372
// return toExpression;
375
// toExpression = value ?? Expression.Null;
376
// if (!toExpression.IsNull) toExpression.Parent = this;
380
// public CaseLabel() {
381
// label = Expression.Null;
382
// toExpression = Expression.Null;
385
// public CaseLabel(Expression label) {
387
// toExpression = Expression.Null;
390
// public CaseLabel(Expression label, Expression toExpression) {
392
// ToExpression = toExpression;
395
// public CaseLabel(BinaryOperatorType binaryOperatorType, Expression label) {
396
// BinaryOperatorType = binaryOperatorType;
398
// toExpression = Expression.Null;
401
// public bool IsDefault {
403
// return label.IsNull;
407
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
408
// return visitor.VisitCaseLabel(this, data);
411
// public override string ToString() {
412
// return string.Format("[CaseLabel Label={0} BinaryOperatorType={1} ToExpression={2}]", Label, BinaryOperatorType, ToExpression);
416
// public class CastExpression : Expression {
418
// TypeReference castTo;
420
// Expression expression;
422
// CastType castType;
424
// public TypeReference CastTo {
429
// castTo = value ?? TypeReference.Null;
430
// if (!castTo.IsNull) castTo.Parent = this;
434
// public Expression Expression {
436
// return expression;
439
// expression = value ?? Expression.Null;
440
// if (!expression.IsNull) expression.Parent = this;
444
// public CastType CastType {
453
// public CastExpression(TypeReference castTo) {
455
// expression = Expression.Null;
458
// public CastExpression(TypeReference castTo, Expression expression, CastType castType) {
460
// Expression = expression;
461
// CastType = castType;
464
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
465
// return visitor.VisitCastExpression(this, data);
468
// public override string ToString() {
469
// return string.Format("[CastExpression CastTo={0} Expression={1} CastType={2}]", CastTo, Expression, CastType);
473
// public class CatchClause : AbstractNode {
475
// TypeReference typeReference;
477
// string variableName;
479
// Statement statementBlock;
481
// Expression condition;
483
// public TypeReference TypeReference {
485
// return typeReference;
488
// typeReference = value ?? TypeReference.Null;
489
// if (!typeReference.IsNull) typeReference.Parent = this;
493
// public string VariableName {
495
// return variableName;
498
// variableName = value ?? "";
502
// public Statement StatementBlock {
504
// return statementBlock;
507
// statementBlock = value ?? Statement.Null;
508
// if (!statementBlock.IsNull) statementBlock.Parent = this;
512
// public Expression Condition {
517
// condition = value ?? Expression.Null;
518
// if (!condition.IsNull) condition.Parent = this;
522
// public CatchClause(TypeReference typeReference, string variableName, Statement statementBlock) {
523
// TypeReference = typeReference;
524
// VariableName = variableName;
525
// StatementBlock = statementBlock;
526
// condition = Expression.Null;
529
// public CatchClause(TypeReference typeReference, string variableName, Statement statementBlock, Expression condition) {
530
// TypeReference = typeReference;
531
// VariableName = variableName;
532
// StatementBlock = statementBlock;
533
// Condition = condition;
536
// public CatchClause(Statement statementBlock) {
537
// StatementBlock = statementBlock;
538
// typeReference = TypeReference.Null;
539
// variableName = "";
540
// condition = Expression.Null;
543
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
544
// return visitor.VisitCatchClause(this, data);
547
// public override string ToString() {
548
// return string.Format("[CatchClause TypeReference={0} VariableName={1} StatementBlock={2} Condition={3}]" +
549
// "", TypeReference, VariableName, StatementBlock, Condition);
553
// public class ClassReferenceExpression : Expression {
555
// public ClassReferenceExpression() {
558
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
559
// return visitor.VisitClassReferenceExpression(this, data);
562
// public override string ToString() {
563
// return "[ClassReferenceExpression]";
567
// public class CollectionInitializerExpression : Expression {
569
// List<Expression> createExpressions;
571
// public List<Expression> CreateExpressions {
573
// return createExpressions;
576
// createExpressions = value ?? new List<Expression>();
580
// public CollectionInitializerExpression() {
581
// createExpressions = new List<Expression>();
584
// public CollectionInitializerExpression(List<Expression> createExpressions) {
585
// CreateExpressions = createExpressions;
588
// public new static CollectionInitializerExpression Null {
590
// return NullCollectionInitializerExpression.Instance;
594
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
595
// return visitor.VisitCollectionInitializerExpression(this, data);
598
// public override string ToString() {
599
// return string.Format("[CollectionInitializerExpression CreateExpressions={0}]", GetCollectionString(CreateExpressions));
603
// internal sealed class NullCollectionInitializerExpression : CollectionInitializerExpression {
605
// internal static NullCollectionInitializerExpression Instance = new NullCollectionInitializerExpression();
607
// public override bool IsNull {
613
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
617
// public override string ToString() {
618
// return "[NullCollectionInitializerExpression]";
622
// public class CollectionRangeVariable : AbstractNode, INullable {
624
// string identifier;
626
// Expression expression;
628
// TypeReference type;
630
// public string Identifier {
632
// return identifier;
635
// identifier = value ?? "";
639
// public Expression Expression {
641
// return expression;
644
// expression = value ?? Expression.Null;
645
// if (!expression.IsNull) expression.Parent = this;
649
// public TypeReference Type {
654
// type = value ?? TypeReference.Null;
655
// if (!type.IsNull) type.Parent = this;
659
// public CollectionRangeVariable() {
661
// expression = Expression.Null;
662
// type = TypeReference.Null;
665
// public virtual bool IsNull {
671
// public static CollectionRangeVariable Null {
673
// return NullCollectionRangeVariable.Instance;
677
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
678
// return visitor.VisitCollectionRangeVariable(this, data);
681
// public override string ToString() {
682
// return string.Format("[CollectionRangeVariable Identifier={0} Expression={1} Type={2}]", Identifier, Expression, Type);
686
// internal sealed class NullCollectionRangeVariable : CollectionRangeVariable {
688
// internal static NullCollectionRangeVariable Instance = new NullCollectionRangeVariable();
690
// public override bool IsNull {
696
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
700
// public override string ToString() {
701
// return "[NullCollectionRangeVariable]";
705
// public class ConditionalExpression : Expression {
707
// Expression condition;
709
// Expression trueExpression;
711
// Expression falseExpression;
713
// public Expression Condition {
718
// condition = value ?? Expression.Null;
719
// if (!condition.IsNull) condition.Parent = this;
723
// public Expression TrueExpression {
725
// return trueExpression;
728
// trueExpression = value ?? Expression.Null;
729
// if (!trueExpression.IsNull) trueExpression.Parent = this;
733
// public Expression FalseExpression {
735
// return falseExpression;
738
// falseExpression = value ?? Expression.Null;
739
// if (!falseExpression.IsNull) falseExpression.Parent = this;
743
// public ConditionalExpression() {
744
// condition = Expression.Null;
745
// trueExpression = Expression.Null;
746
// falseExpression = Expression.Null;
749
// public ConditionalExpression(Expression condition, Expression trueExpression, Expression falseExpression) {
750
// Condition = condition;
751
// TrueExpression = trueExpression;
752
// FalseExpression = falseExpression;
755
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
756
// return visitor.VisitConditionalExpression(this, data);
759
// public override string ToString() {
760
// return string.Format("[ConditionalExpression Condition={0} TrueExpression={1} FalseExpression={2}]", Condition, TrueExpression, FalseExpression);
764
// public class ConstructorDeclaration : ParametrizedNode {
766
// ConstructorInitializer constructorInitializer;
768
// BlockStatement body;
770
// public ConstructorInitializer ConstructorInitializer {
772
// return constructorInitializer;
775
// constructorInitializer = value ?? ConstructorInitializer.Null;
776
// if (!constructorInitializer.IsNull) constructorInitializer.Parent = this;
780
// public BlockStatement Body {
785
// body = value ?? BlockStatement.Null;
786
// if (!body.IsNull) body.Parent = this;
790
// public ConstructorDeclaration(string name, Modifiers modifier, List<ParameterDeclarationExpression> parameters, List<AttributeSection> attributes) {
792
// Modifier = modifier;
793
// Parameters = parameters;
794
// Attributes = attributes;
795
// constructorInitializer = ConstructorInitializer.Null;
796
// body = BlockStatement.Null;
799
// public ConstructorDeclaration(string name, Modifiers modifier, List<ParameterDeclarationExpression> parameters, ConstructorInitializer constructorInitializer, List<AttributeSection> attributes) {
801
// Modifier = modifier;
802
// Parameters = parameters;
803
// ConstructorInitializer = constructorInitializer;
804
// Attributes = attributes;
805
// body = BlockStatement.Null;
808
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
809
// return visitor.VisitConstructorDeclaration(this, data);
812
// public override string ToString() {
813
// return string.Format("[ConstructorDeclaration ConstructorInitializer={0} Body={1} Name={2} Parameters={" +
814
// "3} Attributes={4} Modifier={5}]", ConstructorInitializer, Body, Name, GetCollectionString(Parameters), GetCollectionString(Attributes), Modifier);
818
// public class ConstructorInitializer : AbstractNode, INullable {
820
// ConstructorInitializerType constructorInitializerType;
822
// List<Expression> arguments;
824
// public ConstructorInitializerType ConstructorInitializerType {
826
// return constructorInitializerType;
829
// constructorInitializerType = value;
833
// public List<Expression> Arguments {
838
// arguments = value ?? new List<Expression>();
842
// public ConstructorInitializer() {
843
// arguments = new List<Expression>();
846
// public virtual bool IsNull {
852
// public static ConstructorInitializer Null {
854
// return NullConstructorInitializer.Instance;
858
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
859
// return visitor.VisitConstructorInitializer(this, data);
862
// public override string ToString() {
863
// return string.Format("[ConstructorInitializer ConstructorInitializerType={0} Arguments={1}]", ConstructorInitializerType, GetCollectionString(Arguments));
867
// internal sealed class NullConstructorInitializer : ConstructorInitializer {
869
// internal static NullConstructorInitializer Instance = new NullConstructorInitializer();
871
// public override bool IsNull {
877
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
881
// public override string ToString() {
882
// return "[NullConstructorInitializer]";
886
// public class ContinueStatement : Statement {
888
// ContinueType continueType;
890
// public ContinueType ContinueType {
892
// return continueType;
895
// continueType = value;
899
// public ContinueStatement() {
902
// public ContinueStatement(ContinueType continueType) {
903
// ContinueType = continueType;
906
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
907
// return visitor.VisitContinueStatement(this, data);
910
// public override string ToString() {
911
// return string.Format("[ContinueStatement ContinueType={0}]", ContinueType);
915
// public class DeclareDeclaration : ParametrizedNode {
921
// CharsetModifier charset;
923
// TypeReference typeReference;
925
// public string Alias {
930
// alias = value ?? "";
934
// public string Library {
939
// library = value ?? "";
943
// public CharsetModifier Charset {
952
// public TypeReference TypeReference {
954
// return typeReference;
957
// typeReference = value ?? TypeReference.Null;
958
// if (!typeReference.IsNull) typeReference.Parent = this;
962
// public DeclareDeclaration(string name, Modifiers modifier, TypeReference typeReference, List<ParameterDeclarationExpression> parameters, List<AttributeSection> attributes, string library, string alias, CharsetModifier charset) {
964
// Modifier = modifier;
965
// TypeReference = typeReference;
966
// Parameters = parameters;
967
// Attributes = attributes;
968
// Library = library;
970
// Charset = charset;
973
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
974
// return visitor.VisitDeclareDeclaration(this, data);
977
// public override string ToString() {
978
// return string.Format("[DeclareDeclaration Alias={0} Library={1} Charset={2} TypeReference={3} Name={4} " +
979
// "Parameters={5} Attributes={6} Modifier={7}]", Alias, Library, Charset, TypeReference, Name, GetCollectionString(Parameters), GetCollectionString(Attributes), Modifier);
983
// public class DefaultValueExpression : Expression {
985
// TypeReference typeReference;
987
// public TypeReference TypeReference {
989
// return typeReference;
992
// typeReference = value ?? TypeReference.Null;
993
// if (!typeReference.IsNull) typeReference.Parent = this;
997
// public DefaultValueExpression(TypeReference typeReference) {
998
// TypeReference = typeReference;
1001
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1002
// return visitor.VisitDefaultValueExpression(this, data);
1005
// public override string ToString() {
1006
// return string.Format("[DefaultValueExpression TypeReference={0}]", TypeReference);
1010
// public class DelegateDeclaration : AttributedNode {
1014
// TypeReference returnType;
1016
// List<ParameterDeclarationExpression> parameters;
1018
// List<TemplateDefinition> templates;
1020
// public string Name {
1025
// name = string.IsNullOrEmpty(value) ? "?" : value;
1029
// public TypeReference ReturnType {
1031
// return returnType;
1034
// returnType = value ?? TypeReference.Null;
1035
// if (!returnType.IsNull) returnType.Parent = this;
1039
// public List<ParameterDeclarationExpression> Parameters {
1041
// return parameters;
1044
// parameters = value ?? new List<ParameterDeclarationExpression>();
1048
// public List<TemplateDefinition> Templates {
1050
// return templates;
1053
// templates = value ?? new List<TemplateDefinition>();
1057
// public DelegateDeclaration(Modifiers modifier, List<AttributeSection> attributes) {
1058
// Modifier = modifier;
1059
// Attributes = attributes;
1061
// returnType = TypeReference.Null;
1062
// parameters = new List<ParameterDeclarationExpression>();
1063
// templates = new List<TemplateDefinition>();
1066
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1067
// return visitor.VisitDelegateDeclaration(this, data);
1070
// public override string ToString() {
1071
// return string.Format("[DelegateDeclaration Name={0} ReturnType={1} Parameters={2} Templates={3} Attribu" +
1072
// "tes={4} Modifier={5}]", Name, ReturnType, GetCollectionString(Parameters), GetCollectionString(Templates), GetCollectionString(Attributes), Modifier);
1076
// public class DirectionExpression : Expression {
1078
// FieldDirection fieldDirection;
1080
// Expression expression;
1082
// public FieldDirection FieldDirection {
1084
// return fieldDirection;
1087
// fieldDirection = value;
1091
// public Expression Expression {
1093
// return expression;
1096
// expression = value ?? Expression.Null;
1097
// if (!expression.IsNull) expression.Parent = this;
1101
// public DirectionExpression(FieldDirection fieldDirection, Expression expression) {
1102
// FieldDirection = fieldDirection;
1103
// Expression = expression;
1106
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1107
// return visitor.VisitDirectionExpression(this, data);
1110
// public override string ToString() {
1111
// return string.Format("[DirectionExpression FieldDirection={0} Expression={1}]", FieldDirection, Expression);
1115
// public class DoLoopStatement : StatementWithEmbeddedStatement {
1117
// Expression condition;
1119
// ConditionType conditionType;
1121
// ConditionPosition conditionPosition;
1123
// public Expression Condition {
1125
// return condition;
1128
// condition = value ?? Expression.Null;
1129
// if (!condition.IsNull) condition.Parent = this;
1133
// public ConditionType ConditionType {
1135
// return conditionType;
1138
// conditionType = value;
1142
// public ConditionPosition ConditionPosition {
1144
// return conditionPosition;
1147
// conditionPosition = value;
1151
// public DoLoopStatement(Expression condition, Statement embeddedStatement, ConditionType conditionType, ConditionPosition conditionPosition) {
1152
// Condition = condition;
1153
// EmbeddedStatement = embeddedStatement;
1154
// ConditionType = conditionType;
1155
// ConditionPosition = conditionPosition;
1158
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1159
// return visitor.VisitDoLoopStatement(this, data);
1162
// public override string ToString() {
1163
// return string.Format("[DoLoopStatement Condition={0} ConditionType={1} ConditionPosition={2} EmbeddedSt" +
1164
// "atement={3}]", Condition, ConditionType, ConditionPosition, EmbeddedStatement);
1168
// public class ElseIfSection : StatementWithEmbeddedStatement {
1170
// Expression condition;
1172
// public Expression Condition {
1174
// return condition;
1177
// condition = value ?? Expression.Null;
1178
// if (!condition.IsNull) condition.Parent = this;
1182
// public ElseIfSection(Expression condition, Statement embeddedStatement) {
1183
// Condition = condition;
1184
// EmbeddedStatement = embeddedStatement;
1187
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1188
// return visitor.VisitElseIfSection(this, data);
1191
// public override string ToString() {
1192
// return string.Format("[ElseIfSection Condition={0} EmbeddedStatement={1}]", Condition, EmbeddedStatement);
1196
// public class EndStatement : Statement {
1198
// public EndStatement() {
1201
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1202
// return visitor.VisitEndStatement(this, data);
1205
// public override string ToString() {
1206
// return "[EndStatement]";
1210
// public class EraseStatement : Statement {
1212
// List<Expression> expressions;
1214
// public List<Expression> Expressions {
1216
// return expressions;
1219
// expressions = value ?? new List<Expression>();
1223
// public EraseStatement() {
1224
// expressions = new List<Expression>();
1227
// public EraseStatement(List<Expression> expressions) {
1228
// Expressions = expressions;
1231
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1232
// return visitor.VisitEraseStatement(this, data);
1235
// public override string ToString() {
1236
// return string.Format("[EraseStatement Expressions={0}]", GetCollectionString(Expressions));
1240
// public class ErrorStatement : Statement {
1242
// Expression expression;
1244
// public Expression Expression {
1246
// return expression;
1249
// expression = value ?? Expression.Null;
1250
// if (!expression.IsNull) expression.Parent = this;
1254
// public ErrorStatement(Expression expression) {
1255
// Expression = expression;
1258
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1259
// return visitor.VisitErrorStatement(this, data);
1262
// public override string ToString() {
1263
// return string.Format("[ErrorStatement Expression={0}]", Expression);
1267
// public class EventAddRegion : EventAddRemoveRegion {
1269
// public EventAddRegion(List<AttributeSection> attributes) :
1270
// base(attributes) {
1273
// public static EventAddRegion Null {
1275
// return NullEventAddRegion.Instance;
1279
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1280
// return visitor.VisitEventAddRegion(this, data);
1283
// public override string ToString() {
1284
// return string.Format("[EventAddRegion Block={0} Parameters={1} Attributes={2} Modifier={3}]", Block, GetCollectionString(Parameters), GetCollectionString(Attributes), Modifier);
1288
// internal sealed class NullEventAddRegion : EventAddRegion {
1290
// private NullEventAddRegion() :
1294
// internal static NullEventAddRegion Instance = new NullEventAddRegion();
1296
// public override bool IsNull {
1302
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1306
// public override string ToString() {
1307
// return "[NullEventAddRegion]";
1311
// public abstract class EventAddRemoveRegion : AttributedNode, INullable {
1313
// BlockStatement block;
1315
// List<ParameterDeclarationExpression> parameters;
1317
// public BlockStatement Block {
1322
// block = value ?? BlockStatement.Null;
1323
// if (!block.IsNull) block.Parent = this;
1327
// public List<ParameterDeclarationExpression> Parameters {
1329
// return parameters;
1332
// parameters = value ?? new List<ParameterDeclarationExpression>();
1336
// protected EventAddRemoveRegion(List<AttributeSection> attributes) {
1337
// Attributes = attributes;
1338
// block = BlockStatement.Null;
1339
// parameters = new List<ParameterDeclarationExpression>();
1342
// public virtual bool IsNull {
1349
// public class EventDeclaration : MemberNode {
1351
// EventAddRegion addRegion;
1353
// EventRemoveRegion removeRegion;
1355
// EventRaiseRegion raiseRegion;
1357
// Location bodyStart;
1359
// Location bodyEnd;
1361
// Expression initializer;
1363
// public EventAddRegion AddRegion {
1365
// return addRegion;
1368
// addRegion = value ?? EventAddRegion.Null;
1369
// if (!addRegion.IsNull) addRegion.Parent = this;
1373
// public EventRemoveRegion RemoveRegion {
1375
// return removeRegion;
1378
// removeRegion = value ?? EventRemoveRegion.Null;
1379
// if (!removeRegion.IsNull) removeRegion.Parent = this;
1383
// public EventRaiseRegion RaiseRegion {
1385
// return raiseRegion;
1388
// raiseRegion = value ?? EventRaiseRegion.Null;
1389
// if (!raiseRegion.IsNull) raiseRegion.Parent = this;
1393
// public Location BodyStart {
1395
// return bodyStart;
1398
// bodyStart = value;
1402
// public Location BodyEnd {
1411
// public Expression Initializer {
1413
// return initializer;
1416
// initializer = value ?? Expression.Null;
1417
// if (!initializer.IsNull) initializer.Parent = this;
1421
// public EventDeclaration() {
1422
// addRegion = EventAddRegion.Null;
1423
// removeRegion = EventRemoveRegion.Null;
1424
// raiseRegion = EventRaiseRegion.Null;
1425
// bodyStart = Location.Empty;
1426
// bodyEnd = Location.Empty;
1427
// initializer = Expression.Null;
1430
// public bool HasAddRegion {
1432
// return !addRegion.IsNull;
1436
// public bool HasRemoveRegion {
1438
// return !removeRegion.IsNull;
1442
// public bool HasRaiseRegion {
1444
// return !raiseRegion.IsNull;
1448
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1449
// return visitor.VisitEventDeclaration(this, data);
1452
// public override string ToString() {
1453
// return string.Format("[EventDeclaration AddRegion={0} RemoveRegion={1} RaiseRegion={2} BodyStart={3} Bo" +
1454
// "dyEnd={4} Initializer={5} InterfaceImplementations={6} TypeReference={7} Name={8" +
1455
// "} Parameters={9} Attributes={10} Modifier={11}]", AddRegion, RemoveRegion, RaiseRegion, BodyStart, BodyEnd, Initializer, GetCollectionString(InterfaceImplementations), TypeReference, Name, GetCollectionString(Parameters), GetCollectionString(Attributes), Modifier);
1459
// public class EventRaiseRegion : EventAddRemoveRegion {
1461
// public EventRaiseRegion(List<AttributeSection> attributes) :
1462
// base(attributes) {
1465
// public static EventRaiseRegion Null {
1467
// return NullEventRaiseRegion.Instance;
1471
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1472
// return visitor.VisitEventRaiseRegion(this, data);
1475
// public override string ToString() {
1476
// return string.Format("[EventRaiseRegion Block={0} Parameters={1} Attributes={2} Modifier={3}]", Block, GetCollectionString(Parameters), GetCollectionString(Attributes), Modifier);
1480
// internal sealed class NullEventRaiseRegion : EventRaiseRegion {
1482
// private NullEventRaiseRegion() :
1486
// internal static NullEventRaiseRegion Instance = new NullEventRaiseRegion();
1488
// public override bool IsNull {
1494
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1498
// public override string ToString() {
1499
// return "[NullEventRaiseRegion]";
1503
// public class EventRemoveRegion : EventAddRemoveRegion {
1505
// public EventRemoveRegion(List<AttributeSection> attributes) :
1506
// base(attributes) {
1509
// public static EventRemoveRegion Null {
1511
// return NullEventRemoveRegion.Instance;
1515
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1516
// return visitor.VisitEventRemoveRegion(this, data);
1519
// public override string ToString() {
1520
// return string.Format("[EventRemoveRegion Block={0} Parameters={1} Attributes={2} Modifier={3}]", Block, GetCollectionString(Parameters), GetCollectionString(Attributes), Modifier);
1524
// internal sealed class NullEventRemoveRegion : EventRemoveRegion {
1526
// private NullEventRemoveRegion() :
1530
// internal static NullEventRemoveRegion Instance = new NullEventRemoveRegion();
1532
// public override bool IsNull {
1538
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1542
// public override string ToString() {
1543
// return "[NullEventRemoveRegion]";
1547
// public class ExitStatement : Statement {
1549
// ExitType exitType;
1551
// public ExitType ExitType {
1556
// exitType = value;
1560
// public ExitStatement(ExitType exitType) {
1561
// ExitType = exitType;
1564
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1565
// return visitor.VisitExitStatement(this, data);
1568
// public override string ToString() {
1569
// return string.Format("[ExitStatement ExitType={0}]", ExitType);
1573
// public class ExpressionRangeVariable : AbstractNode, INullable {
1575
// string identifier;
1577
// Expression expression;
1579
// TypeReference type;
1581
// public string Identifier {
1583
// return identifier;
1586
// identifier = value ?? "";
1590
// public Expression Expression {
1592
// return expression;
1595
// expression = value ?? Expression.Null;
1596
// if (!expression.IsNull) expression.Parent = this;
1600
// public TypeReference Type {
1605
// type = value ?? TypeReference.Null;
1606
// if (!type.IsNull) type.Parent = this;
1610
// public ExpressionRangeVariable() {
1612
// expression = Expression.Null;
1613
// type = TypeReference.Null;
1616
// public virtual bool IsNull {
1622
// public static ExpressionRangeVariable Null {
1624
// return NullExpressionRangeVariable.Instance;
1628
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1629
// return visitor.VisitExpressionRangeVariable(this, data);
1632
// public override string ToString() {
1633
// return string.Format("[ExpressionRangeVariable Identifier={0} Expression={1} Type={2}]", Identifier, Expression, Type);
1637
// internal sealed class NullExpressionRangeVariable : ExpressionRangeVariable {
1639
// internal static NullExpressionRangeVariable Instance = new NullExpressionRangeVariable();
1641
// public override bool IsNull {
1647
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1651
// public override string ToString() {
1652
// return "[NullExpressionRangeVariable]";
1656
// public class ExpressionStatement : Statement {
1658
// Expression expression;
1660
// public Expression Expression {
1662
// return expression;
1665
// expression = value ?? Expression.Null;
1666
// if (!expression.IsNull) expression.Parent = this;
1670
// public ExpressionStatement(Expression expression) {
1671
// Expression = expression;
1674
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1675
// return visitor.VisitExpressionStatement(this, data);
1678
// public override string ToString() {
1679
// return string.Format("[ExpressionStatement Expression={0}]", Expression);
1683
// public class ExternAliasDirective : AbstractNode {
1687
// public string Name {
1692
// name = value ?? "";
1696
// public ExternAliasDirective() {
1700
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1701
// return visitor.VisitExternAliasDirective(this, data);
1704
// public override string ToString() {
1705
// return string.Format("[ExternAliasDirective Name={0}]", Name);
1709
// public class FieldDeclaration : AttributedNode {
1711
// TypeReference typeReference;
1713
// List<VariableDeclaration> fields;
1715
// public TypeReference TypeReference {
1717
// return typeReference;
1720
// typeReference = value ?? TypeReference.Null;
1721
// if (!typeReference.IsNull) typeReference.Parent = this;
1725
// public List<VariableDeclaration> Fields {
1730
// fields = value ?? new List<VariableDeclaration>();
1734
// public FieldDeclaration(List<AttributeSection> attributes) {
1735
// Attributes = attributes;
1736
// typeReference = TypeReference.Null;
1737
// fields = new List<VariableDeclaration>();
1740
// public FieldDeclaration(List<AttributeSection> attributes, TypeReference typeReference, Modifiers modifier) {
1741
// Attributes = attributes;
1742
// TypeReference = typeReference;
1743
// Modifier = modifier;
1744
// fields = new List<VariableDeclaration>();
1748
// public TypeReference GetTypeForField(int fieldIndex)
1750
// if (!typeReference.IsNull) {
1751
// return typeReference;
1753
// return ((VariableDeclaration)Fields[fieldIndex]).TypeReference;
1757
// public VariableDeclaration GetVariableDeclaration(string variableName)
1759
// foreach (VariableDeclaration variableDeclaration in Fields) {
1760
// if (variableDeclaration.Name == variableName) {
1761
// return variableDeclaration;
1767
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1768
// return visitor.VisitFieldDeclaration(this, data);
1771
// public override string ToString() {
1772
// return string.Format("[FieldDeclaration TypeReference={0} Fields={1} Attributes={2} Modifier={3}]", TypeReference, GetCollectionString(Fields), GetCollectionString(Attributes), Modifier);
1776
// public class ForeachStatement : StatementWithEmbeddedStatement {
1778
// TypeReference typeReference;
1780
// string variableName;
1782
// Expression expression;
1784
// Expression nextExpression;
1786
// public TypeReference TypeReference {
1788
// return typeReference;
1791
// typeReference = value ?? TypeReference.Null;
1792
// if (!typeReference.IsNull) typeReference.Parent = this;
1796
// public string VariableName {
1798
// return variableName;
1801
// variableName = value ?? "";
1805
// public Expression Expression {
1807
// return expression;
1810
// expression = value ?? Expression.Null;
1811
// if (!expression.IsNull) expression.Parent = this;
1815
// public Expression NextExpression {
1817
// return nextExpression;
1820
// nextExpression = value ?? Expression.Null;
1821
// if (!nextExpression.IsNull) nextExpression.Parent = this;
1825
// public ForeachStatement(TypeReference typeReference, string variableName, Expression expression, Statement embeddedStatement) {
1826
// TypeReference = typeReference;
1827
// VariableName = variableName;
1828
// Expression = expression;
1829
// EmbeddedStatement = embeddedStatement;
1830
// nextExpression = Expression.Null;
1833
// public ForeachStatement(TypeReference typeReference, string variableName, Expression expression, Statement embeddedStatement, Expression nextExpression) {
1834
// TypeReference = typeReference;
1835
// VariableName = variableName;
1836
// Expression = expression;
1837
// EmbeddedStatement = embeddedStatement;
1838
// NextExpression = nextExpression;
1841
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1842
// return visitor.VisitForeachStatement(this, data);
1845
// public override string ToString() {
1846
// return string.Format("[ForeachStatement TypeReference={0} VariableName={1} Expression={2} NextExpressio" +
1847
// "n={3} EmbeddedStatement={4}]", TypeReference, VariableName, Expression, NextExpression, EmbeddedStatement);
1851
// public class ForNextStatement : StatementWithEmbeddedStatement {
1853
// Expression start;
1859
// List<Expression> nextExpressions;
1861
// TypeReference typeReference;
1863
// string variableName;
1865
// Expression loopVariableExpression;
1867
// public Expression Start {
1872
// start = value ?? Expression.Null;
1873
// if (!start.IsNull) start.Parent = this;
1877
// public Expression End {
1882
// end = value ?? Expression.Null;
1883
// if (!end.IsNull) end.Parent = this;
1887
// public Expression Step {
1892
// step = value ?? Expression.Null;
1893
// if (!step.IsNull) step.Parent = this;
1897
// public List<Expression> NextExpressions {
1899
// return nextExpressions;
1902
// nextExpressions = value ?? new List<Expression>();
1906
// public TypeReference TypeReference {
1908
// return typeReference;
1911
// typeReference = value ?? TypeReference.Null;
1912
// if (!typeReference.IsNull) typeReference.Parent = this;
1916
// public string VariableName {
1918
// return variableName;
1921
// variableName = value ?? "";
1925
// public Expression LoopVariableExpression {
1927
// return loopVariableExpression;
1930
// loopVariableExpression = value ?? Expression.Null;
1931
// if (!loopVariableExpression.IsNull) loopVariableExpression.Parent = this;
1935
// public ForNextStatement() {
1936
// start = Expression.Null;
1937
// end = Expression.Null;
1938
// step = Expression.Null;
1939
// nextExpressions = new List<Expression>();
1940
// typeReference = TypeReference.Null;
1941
// variableName = "";
1942
// loopVariableExpression = Expression.Null;
1945
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1946
// return visitor.VisitForNextStatement(this, data);
1949
// public override string ToString() {
1950
// return string.Format("[ForNextStatement Start={0} End={1} Step={2} NextExpressions={3} TypeReference={4" +
1951
// "} VariableName={5} LoopVariableExpression={6} EmbeddedStatement={7}]", Start, End, Step, GetCollectionString(NextExpressions), TypeReference, VariableName, LoopVariableExpression, EmbeddedStatement);
1955
// public class GotoStatement : Statement {
1959
// public string Label {
1964
// label = value ?? "";
1968
// public GotoStatement(string label) {
1972
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
1973
// return visitor.VisitGotoStatement(this, data);
1976
// public override string ToString() {
1977
// return string.Format("[GotoStatement Label={0}]", Label);
1981
// public class IfElseStatement : Statement {
1983
// Expression condition;
1985
// List<Statement> trueStatement;
1987
// List<Statement> falseStatement;
1989
// List<ElseIfSection> elseIfSections;
1991
// public Expression Condition {
1993
// return condition;
1996
// condition = value ?? Expression.Null;
1997
// if (!condition.IsNull) condition.Parent = this;
2001
// public List<Statement> TrueStatement {
2003
// return trueStatement;
2006
// trueStatement = value ?? new List<Statement>();
2010
// public List<Statement> FalseStatement {
2012
// return falseStatement;
2015
// falseStatement = value ?? new List<Statement>();
2019
// public List<ElseIfSection> ElseIfSections {
2021
// return elseIfSections;
2024
// elseIfSections = value ?? new List<ElseIfSection>();
2028
// public IfElseStatement(Expression condition) {
2029
// Condition = condition;
2030
// trueStatement = new List<Statement>();
2031
// falseStatement = new List<Statement>();
2032
// elseIfSections = new List<ElseIfSection>();
2036
// public IfElseStatement(Expression condition, Statement trueStatement)
2037
// : this(condition) {
2038
// this.trueStatement.Add(Statement.CheckNull(trueStatement));
2039
// if (trueStatement != null) trueStatement.Parent = this;
2042
// public bool HasElseStatements {
2044
// return falseStatement.Count > 0;
2048
// public bool HasElseIfSections {
2050
// return elseIfSections.Count > 0;
2055
// public IfElseStatement(Expression condition, Statement trueStatement, Statement falseStatement)
2056
// : this(condition) {
2057
// this.trueStatement.Add(Statement.CheckNull(trueStatement));
2058
// this.falseStatement.Add(Statement.CheckNull(falseStatement));
2059
// if (trueStatement != null) trueStatement.Parent = this;
2060
// if (falseStatement != null) falseStatement.Parent = this;
2063
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2064
// return visitor.VisitIfElseStatement(this, data);
2067
// public override string ToString() {
2068
// return string.Format("[IfElseStatement Condition={0} TrueStatement={1} FalseStatement={2} ElseIfSection" +
2069
// "s={3}]", Condition, GetCollectionString(TrueStatement), GetCollectionString(FalseStatement), GetCollectionString(ElseIfSections));
2073
// public class InterfaceImplementation : AbstractNode {
2075
// TypeReference interfaceType;
2077
// string memberName;
2079
// public TypeReference InterfaceType {
2081
// return interfaceType;
2084
// interfaceType = value ?? TypeReference.Null;
2085
// if (!interfaceType.IsNull) interfaceType.Parent = this;
2089
// public string MemberName {
2091
// return memberName;
2094
// memberName = string.IsNullOrEmpty(value) ? "?" : value;
2098
// public InterfaceImplementation(TypeReference interfaceType, string memberName) {
2099
// InterfaceType = interfaceType;
2100
// MemberName = memberName;
2103
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2104
// return visitor.VisitInterfaceImplementation(this, data);
2107
// public override string ToString() {
2108
// return string.Format("[InterfaceImplementation InterfaceType={0} MemberName={1}]", InterfaceType, MemberName);
2112
// public class InvocationExpression : Expression {
2114
// Expression targetObject;
2116
// List<Expression> arguments;
2118
// public Expression TargetObject {
2120
// return targetObject;
2123
// targetObject = value ?? Expression.Null;
2124
// if (!targetObject.IsNull) targetObject.Parent = this;
2128
// public List<Expression> Arguments {
2130
// return arguments;
2133
// arguments = value ?? new List<Expression>();
2137
// public InvocationExpression(Expression targetObject) {
2138
// TargetObject = targetObject;
2139
// arguments = new List<Expression>();
2142
// public InvocationExpression(Expression targetObject, List<Expression> arguments) {
2143
// TargetObject = targetObject;
2144
// Arguments = arguments;
2147
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2148
// return visitor.VisitInvocationExpression(this, data);
2151
// public override string ToString() {
2152
// return string.Format("[InvocationExpression TargetObject={0} Arguments={1}]", TargetObject, GetCollectionString(Arguments));
2156
// public class LabelStatement : Statement {
2160
// public string Label {
2165
// label = value ?? "";
2169
// public LabelStatement(string label) {
2173
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2174
// return visitor.VisitLabelStatement(this, data);
2177
// public override string ToString() {
2178
// return string.Format("[LabelStatement Label={0}]", Label);
2182
// public class LambdaExpression : Expression {
2184
// List<ParameterDeclarationExpression> parameters;
2186
// Statement statementBody;
2188
// Expression expressionBody;
2190
// TypeReference returnType;
2192
// public List<ParameterDeclarationExpression> Parameters {
2194
// return parameters;
2197
// parameters = value ?? new List<ParameterDeclarationExpression>();
2201
// public Statement StatementBody {
2203
// return statementBody;
2206
// statementBody = value ?? Statement.Null;
2207
// if (!statementBody.IsNull) statementBody.Parent = this;
2211
// public Expression ExpressionBody {
2213
// return expressionBody;
2216
// expressionBody = value ?? Expression.Null;
2217
// if (!expressionBody.IsNull) expressionBody.Parent = this;
2221
// public TypeReference ReturnType {
2223
// return returnType;
2226
// returnType = value ?? TypeReference.Null;
2227
// if (!returnType.IsNull) returnType.Parent = this;
2231
// public LambdaExpression() {
2232
// parameters = new List<ParameterDeclarationExpression>();
2233
// statementBody = Statement.Null;
2234
// expressionBody = Expression.Null;
2235
// returnType = TypeReference.Null;
2238
// public Location ExtendedEndLocation { get; set; }
2240
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2241
// return visitor.VisitLambdaExpression(this, data);
2244
// public override string ToString() {
2245
// return string.Format("[LambdaExpression Parameters={0} StatementBody={1} ExpressionBody={2} ReturnType=" +
2246
// "{3}]", GetCollectionString(Parameters), StatementBody, ExpressionBody, ReturnType);
2250
// public class LockStatement : StatementWithEmbeddedStatement {
2252
// Expression lockExpression;
2254
// public Expression LockExpression {
2256
// return lockExpression;
2259
// lockExpression = value ?? Expression.Null;
2260
// if (!lockExpression.IsNull) lockExpression.Parent = this;
2264
// public LockStatement(Expression lockExpression, Statement embeddedStatement) {
2265
// LockExpression = lockExpression;
2266
// EmbeddedStatement = embeddedStatement;
2269
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2270
// return visitor.VisitLockStatement(this, data);
2273
// public override string ToString() {
2274
// return string.Format("[LockStatement LockExpression={0} EmbeddedStatement={1}]", LockExpression, EmbeddedStatement);
2278
// public class MemberInitializerExpression : Expression {
2284
// Expression expression;
2286
// public string Name {
2291
// name = value ?? "";
2295
// public bool IsKey {
2304
// public Expression Expression {
2306
// return expression;
2309
// expression = value ?? Expression.Null;
2310
// if (!expression.IsNull) expression.Parent = this;
2314
// public MemberInitializerExpression() {
2316
// expression = Expression.Null;
2319
// public MemberInitializerExpression(string name, Expression expression) {
2321
// Expression = expression;
2324
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2325
// return visitor.VisitMemberInitializerExpression(this, data);
2328
// public override string ToString() {
2329
// return string.Format("[MemberInitializerExpression Name={0} IsKey={1} Expression={2}]", Name, IsKey, Expression);
2333
// public abstract class MemberNode : ParametrizedNode {
2335
// List<InterfaceImplementation> interfaceImplementations;
2337
// TypeReference typeReference;
2339
// public List<InterfaceImplementation> InterfaceImplementations {
2341
// return interfaceImplementations;
2344
// interfaceImplementations = value ?? new List<InterfaceImplementation>();
2348
// public TypeReference TypeReference {
2350
// return typeReference;
2353
// typeReference = value ?? TypeReference.Null;
2354
// if (!typeReference.IsNull) typeReference.Parent = this;
2358
// protected MemberNode() {
2359
// interfaceImplementations = new List<InterfaceImplementation>();
2360
// typeReference = TypeReference.Null;
2363
// protected MemberNode(Modifiers modifier, List<AttributeSection> attributes, string name, List<ParameterDeclarationExpression> parameters) {
2364
// Modifier = modifier;
2365
// Attributes = attributes;
2367
// Parameters = parameters;
2368
// interfaceImplementations = new List<InterfaceImplementation>();
2369
// typeReference = TypeReference.Null;
2373
// public class MemberReferenceExpression : Expression {
2375
// Expression targetObject;
2377
// string memberName;
2379
// List<TypeReference> typeArguments;
2381
// public Expression TargetObject {
2383
// return targetObject;
2386
// targetObject = value ?? Expression.Null;
2387
// if (!targetObject.IsNull) targetObject.Parent = this;
2391
// public string MemberName {
2393
// return memberName;
2396
// memberName = value ?? "";
2400
// public List<TypeReference> TypeArguments {
2402
// return typeArguments;
2405
// typeArguments = value ?? new List<TypeReference>();
2409
// public MemberReferenceExpression(Expression targetObject, string memberName) {
2410
// TargetObject = targetObject;
2411
// MemberName = memberName;
2412
// typeArguments = new List<TypeReference>();
2415
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2416
// return visitor.VisitMemberReferenceExpression(this, data);
2419
// public override string ToString() {
2420
// return string.Format("[MemberReferenceExpression TargetObject={0} MemberName={1} TypeArguments={2}]", TargetObject, MemberName, GetCollectionString(TypeArguments));
2424
// public class MethodDeclaration : MemberNode {
2426
// BlockStatement body;
2428
// List<string> handlesClause;
2430
// List<TemplateDefinition> templates;
2432
// bool isExtensionMethod;
2434
// public BlockStatement Body {
2439
// body = value ?? BlockStatement.Null;
2440
// if (!body.IsNull) body.Parent = this;
2444
// public List<string> HandlesClause {
2446
// return handlesClause;
2449
// handlesClause = value ?? new List<String>();
2453
// public List<TemplateDefinition> Templates {
2455
// return templates;
2458
// templates = value ?? new List<TemplateDefinition>();
2462
// public bool IsExtensionMethod {
2464
// return isExtensionMethod;
2467
// isExtensionMethod = value;
2471
// public MethodDeclaration() {
2472
// body = BlockStatement.Null;
2473
// handlesClause = new List<String>();
2474
// templates = new List<TemplateDefinition>();
2477
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2478
// return visitor.VisitMethodDeclaration(this, data);
2481
// public override string ToString() {
2482
// return string.Format("[MethodDeclaration Body={0} HandlesClause={1} Templates={2} IsExtensionMethod={3}" +
2483
// " InterfaceImplementations={4} TypeReference={5} Name={6} Parameters={7} Attribut" +
2484
// "es={8} Modifier={9}]", Body, GetCollectionString(HandlesClause), GetCollectionString(Templates), IsExtensionMethod, GetCollectionString(InterfaceImplementations), TypeReference, Name, GetCollectionString(Parameters), GetCollectionString(Attributes), Modifier);
2488
// public class NamedArgumentExpression : Expression {
2492
// Expression expression;
2494
// public string Name {
2499
// name = value ?? "";
2503
// public Expression Expression {
2505
// return expression;
2508
// expression = value ?? Expression.Null;
2509
// if (!expression.IsNull) expression.Parent = this;
2513
// public NamedArgumentExpression() {
2515
// expression = Expression.Null;
2518
// public NamedArgumentExpression(string name, Expression expression) {
2520
// Expression = expression;
2523
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2524
// return visitor.VisitNamedArgumentExpression(this, data);
2527
// public override string ToString() {
2528
// return string.Format("[NamedArgumentExpression Name={0} Expression={1}]", Name, Expression);
2532
// public class NamespaceDeclaration : AbstractNode {
2536
// public string Name {
2541
// name = value ?? "";
2545
// public NamespaceDeclaration(string name) {
2549
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2550
// return visitor.VisitNamespaceDeclaration(this, data);
2553
// public override string ToString() {
2554
// return string.Format("[NamespaceDeclaration Name={0}]", Name);
2558
// public class ObjectCreateExpression : Expression {
2560
// TypeReference createType;
2562
// List<Expression> parameters;
2564
// CollectionInitializerExpression objectInitializer;
2566
// public TypeReference CreateType {
2568
// return createType;
2571
// createType = value ?? TypeReference.Null;
2572
// if (!createType.IsNull) createType.Parent = this;
2576
// public List<Expression> Parameters {
2578
// return parameters;
2581
// parameters = value ?? new List<Expression>();
2585
// public CollectionInitializerExpression ObjectInitializer {
2587
// return objectInitializer;
2590
// objectInitializer = value ?? CollectionInitializerExpression.Null;
2591
// if (!objectInitializer.IsNull) objectInitializer.Parent = this;
2595
// public ObjectCreateExpression(TypeReference createType, List<Expression> parameters) {
2596
// CreateType = createType;
2597
// Parameters = parameters;
2598
// objectInitializer = CollectionInitializerExpression.Null;
2601
// public bool IsAnonymousType {
2603
// return createType.IsNull || string.IsNullOrEmpty(createType.Type);
2607
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2608
// return visitor.VisitObjectCreateExpression(this, data);
2611
// public override string ToString() {
2612
// return string.Format("[ObjectCreateExpression CreateType={0} Parameters={1} ObjectInitializer={2}]", CreateType, GetCollectionString(Parameters), ObjectInitializer);
2616
// public class OnErrorStatement : StatementWithEmbeddedStatement {
2618
// public OnErrorStatement(Statement embeddedStatement) {
2619
// EmbeddedStatement = embeddedStatement;
2622
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2623
// return visitor.VisitOnErrorStatement(this, data);
2626
// public override string ToString() {
2627
// return string.Format("[OnErrorStatement EmbeddedStatement={0}]", EmbeddedStatement);
2631
// public class OperatorDeclaration : MethodDeclaration {
2633
// ConversionType conversionType;
2635
// OverloadableOperatorType overloadableOperator;
2637
// public ConversionType ConversionType {
2639
// return conversionType;
2642
// conversionType = value;
2646
// public OverloadableOperatorType OverloadableOperator {
2648
// return overloadableOperator;
2651
// overloadableOperator = value;
2655
// public OperatorDeclaration() {
2658
// public bool IsConversionOperator {
2660
// return conversionType != ConversionType.None;
2664
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2665
// return visitor.VisitOperatorDeclaration(this, data);
2668
// public override string ToString() {
2669
// return string.Format("[OperatorDeclaration ConversionType={0} OverloadableOperator={1} Body={2} Handles" +
2670
// "Clause={3} Templates={4} IsExtensionMethod={5} InterfaceImplementations={6} Type" +
2671
// "Reference={7} Name={8} Parameters={9} Attributes={10} Modifier={11}]", ConversionType, OverloadableOperator, Body, GetCollectionString(HandlesClause), GetCollectionString(Templates), IsExtensionMethod, GetCollectionString(InterfaceImplementations), TypeReference, Name, GetCollectionString(Parameters), GetCollectionString(Attributes), Modifier);
2675
// public class ParameterDeclarationExpression : Expression {
2677
// List<AttributeSection> attributes;
2679
// string parameterName;
2681
// TypeReference typeReference;
2683
// ParameterModifiers paramModifier;
2685
// Expression defaultValue;
2687
// public List<AttributeSection> Attributes {
2689
// return attributes;
2692
// attributes = value ?? new List<AttributeSection>();
2696
// public string ParameterName {
2698
// return parameterName;
2701
// parameterName = string.IsNullOrEmpty(value) ? "?" : value;
2705
// public TypeReference TypeReference {
2707
// return typeReference;
2710
// typeReference = value ?? TypeReference.Null;
2711
// if (!typeReference.IsNull) typeReference.Parent = this;
2715
// public ParameterModifiers ParamModifier {
2717
// return paramModifier;
2720
// paramModifier = value;
2724
// public Expression DefaultValue {
2726
// return defaultValue;
2729
// defaultValue = value ?? Expression.Null;
2730
// if (!defaultValue.IsNull) defaultValue.Parent = this;
2734
// public ParameterDeclarationExpression(TypeReference typeReference, string parameterName) {
2735
// TypeReference = typeReference;
2736
// ParameterName = parameterName;
2737
// attributes = new List<AttributeSection>();
2738
// defaultValue = Expression.Null;
2741
// public ParameterDeclarationExpression(TypeReference typeReference, string parameterName, ParameterModifiers paramModifier) {
2742
// TypeReference = typeReference;
2743
// ParameterName = parameterName;
2744
// ParamModifier = paramModifier;
2745
// attributes = new List<AttributeSection>();
2746
// defaultValue = Expression.Null;
2749
// public ParameterDeclarationExpression(TypeReference typeReference, string parameterName, ParameterModifiers paramModifier, Expression defaultValue) {
2750
// TypeReference = typeReference;
2751
// ParameterName = parameterName;
2752
// ParamModifier = paramModifier;
2753
// DefaultValue = defaultValue;
2754
// attributes = new List<AttributeSection>();
2757
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2758
// return visitor.VisitParameterDeclarationExpression(this, data);
2761
// public override string ToString() {
2762
// return string.Format("[ParameterDeclarationExpression Attributes={0} ParameterName={1} TypeReference={2" +
2763
// "} ParamModifier={3} DefaultValue={4}]", GetCollectionString(Attributes), ParameterName, TypeReference, ParamModifier, DefaultValue);
2767
// public abstract class ParametrizedNode : AttributedNode {
2771
// List<ParameterDeclarationExpression> parameters;
2773
// public string Name {
2778
// name = value ?? "";
2782
// public List<ParameterDeclarationExpression> Parameters {
2784
// return parameters;
2787
// parameters = value ?? new List<ParameterDeclarationExpression>();
2791
// protected ParametrizedNode() {
2793
// parameters = new List<ParameterDeclarationExpression>();
2796
// protected ParametrizedNode(Modifiers modifier, List<AttributeSection> attributes, string name, List<ParameterDeclarationExpression> parameters) {
2797
// Modifier = modifier;
2798
// Attributes = attributes;
2800
// Parameters = parameters;
2804
// public class ParenthesizedExpression : Expression {
2806
// Expression expression;
2808
// public Expression Expression {
2810
// return expression;
2813
// expression = value ?? Expression.Null;
2814
// if (!expression.IsNull) expression.Parent = this;
2818
// public ParenthesizedExpression(Expression expression) {
2819
// Expression = expression;
2822
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2823
// return visitor.VisitParenthesizedExpression(this, data);
2826
// public override string ToString() {
2827
// return string.Format("[ParenthesizedExpression Expression={0}]", Expression);
2831
// public class PropertyDeclaration : MemberNode {
2833
// Location bodyStart;
2835
// Location bodyEnd;
2837
// PropertyGetRegion getRegion;
2839
// PropertySetRegion setRegion;
2841
// Expression initializer;
2843
// public Location BodyStart {
2845
// return bodyStart;
2848
// bodyStart = value;
2852
// public Location BodyEnd {
2861
// public PropertyGetRegion GetRegion {
2863
// return getRegion;
2866
// getRegion = value ?? PropertyGetRegion.Null;
2867
// if (!getRegion.IsNull) getRegion.Parent = this;
2871
// public PropertySetRegion SetRegion {
2873
// return setRegion;
2876
// setRegion = value ?? PropertySetRegion.Null;
2877
// if (!setRegion.IsNull) setRegion.Parent = this;
2881
// public Expression Initializer {
2883
// return initializer;
2886
// initializer = value ?? Expression.Null;
2887
// if (!initializer.IsNull) initializer.Parent = this;
2891
// public PropertyDeclaration(Modifiers modifier, List<AttributeSection> attributes, string name, List<ParameterDeclarationExpression> parameters) {
2892
// Modifier = modifier;
2893
// Attributes = attributes;
2895
// Parameters = parameters;
2896
// bodyStart = Location.Empty;
2897
// bodyEnd = Location.Empty;
2898
// getRegion = PropertyGetRegion.Null;
2899
// setRegion = PropertySetRegion.Null;
2900
// initializer = Expression.Null;
2903
// public bool IsReadOnly {
2905
// return HasGetRegion && !HasSetRegion;
2909
// public bool HasGetRegion {
2911
// return !getRegion.IsNull;
2915
// public bool IsWriteOnly {
2917
// return !HasGetRegion && HasSetRegion;
2921
// public bool IsIndexer {
2923
// return (Modifier & Modifiers.Default) != 0;
2928
// internal PropertyDeclaration(string name, TypeReference typeReference, Modifiers modifier, List<AttributeSection> attributes) : this(modifier, attributes, name, null)
2930
// this.TypeReference = typeReference;
2931
// if ((modifier & Modifiers.ReadOnly) != Modifiers.ReadOnly) {
2932
// this.SetRegion = new PropertySetRegion(null, null);
2934
// if ((modifier & Modifiers.WriteOnly) != Modifiers.WriteOnly) {
2935
// this.GetRegion = new PropertyGetRegion(null, null);
2939
// public bool HasSetRegion {
2941
// return !setRegion.IsNull;
2945
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2946
// return visitor.VisitPropertyDeclaration(this, data);
2949
// public override string ToString() {
2950
// return string.Format("[PropertyDeclaration BodyStart={0} BodyEnd={1} GetRegion={2} SetRegion={3} Initia" +
2951
// "lizer={4} InterfaceImplementations={5} TypeReference={6} Name={7} Parameters={8}" +
2952
// " Attributes={9} Modifier={10}]", BodyStart, BodyEnd, GetRegion, SetRegion, Initializer, GetCollectionString(InterfaceImplementations), TypeReference, Name, GetCollectionString(Parameters), GetCollectionString(Attributes), Modifier);
2956
// public class PropertyGetRegion : PropertyGetSetRegion {
2958
// public PropertyGetRegion(BlockStatement block, List<AttributeSection> attributes) :
2959
// base(block, attributes) {
2962
// public static PropertyGetRegion Null {
2964
// return NullPropertyGetRegion.Instance;
2968
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2969
// return visitor.VisitPropertyGetRegion(this, data);
2972
// public override string ToString() {
2973
// return string.Format("[PropertyGetRegion Block={0} Attributes={1} Modifier={2}]", Block, GetCollectionString(Attributes), Modifier);
2977
// internal sealed class NullPropertyGetRegion : PropertyGetRegion {
2979
// private NullPropertyGetRegion() :
2980
// base(null, null) {
2983
// internal static NullPropertyGetRegion Instance = new NullPropertyGetRegion();
2985
// public override bool IsNull {
2991
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
2995
// public override string ToString() {
2996
// return "[NullPropertyGetRegion]";
3000
// public abstract class PropertyGetSetRegion : AttributedNode, INullable {
3002
// BlockStatement block;
3004
// public BlockStatement Block {
3009
// block = value ?? BlockStatement.Null;
3010
// if (!block.IsNull) block.Parent = this;
3014
// protected PropertyGetSetRegion(BlockStatement block, List<AttributeSection> attributes) {
3016
// Attributes = attributes;
3019
// public virtual bool IsNull {
3026
// public class PropertySetRegion : PropertyGetSetRegion {
3028
// List<ParameterDeclarationExpression> parameters;
3030
// public List<ParameterDeclarationExpression> Parameters {
3032
// return parameters;
3035
// parameters = value ?? new List<ParameterDeclarationExpression>();
3039
// public PropertySetRegion(BlockStatement block, List<AttributeSection> attributes) :
3040
// base(block, attributes) {
3041
// parameters = new List<ParameterDeclarationExpression>();
3044
// public static PropertySetRegion Null {
3046
// return NullPropertySetRegion.Instance;
3050
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3051
// return visitor.VisitPropertySetRegion(this, data);
3054
// public override string ToString() {
3055
// return string.Format("[PropertySetRegion Parameters={0} Block={1} Attributes={2} Modifier={3}]", GetCollectionString(Parameters), Block, GetCollectionString(Attributes), Modifier);
3059
// internal sealed class NullPropertySetRegion : PropertySetRegion {
3061
// private NullPropertySetRegion() :
3062
// base(null, null) {
3065
// internal static NullPropertySetRegion Instance = new NullPropertySetRegion();
3067
// public override bool IsNull {
3073
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3077
// public override string ToString() {
3078
// return "[NullPropertySetRegion]";
3082
// public class QueryExpression : Expression {
3084
// List<QueryExpressionClause> clauses;
3086
// public List<QueryExpressionClause> Clauses {
3091
// clauses = value ?? new List<QueryExpressionClause>();
3095
// public QueryExpression() {
3096
// clauses = new List<QueryExpressionClause>();
3099
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3100
// return visitor.VisitQueryExpression(this, data);
3103
// public override string ToString() {
3104
// return string.Format("[QueryExpression Clauses={0}]", GetCollectionString(Clauses));
3108
// public class QueryExpressionAggregateClause : QueryExpressionClause {
3110
// CollectionRangeVariable source;
3112
// List<QueryExpressionClause> middleClauses;
3114
// List<ExpressionRangeVariable> intoVariables;
3116
// public CollectionRangeVariable Source {
3121
// source = value ?? CollectionRangeVariable.Null;
3122
// if (!source.IsNull) source.Parent = this;
3126
// public List<QueryExpressionClause> MiddleClauses {
3128
// return middleClauses;
3131
// middleClauses = value ?? new List<QueryExpressionClause>();
3135
// public List<ExpressionRangeVariable> IntoVariables {
3137
// return intoVariables;
3140
// intoVariables = value ?? new List<ExpressionRangeVariable>();
3144
// public QueryExpressionAggregateClause() {
3145
// source = CollectionRangeVariable.Null;
3146
// middleClauses = new List<QueryExpressionClause>();
3147
// intoVariables = new List<ExpressionRangeVariable>();
3150
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3151
// return visitor.VisitQueryExpressionAggregateClause(this, data);
3154
// public override string ToString() {
3155
// return string.Format("[QueryExpressionAggregateClause Source={0} MiddleClauses={1} IntoVariables={2}]", Source, GetCollectionString(MiddleClauses), GetCollectionString(IntoVariables));
3159
// public abstract class QueryExpressionClause : AbstractNode, INullable {
3161
// protected QueryExpressionClause() {
3164
// public virtual bool IsNull {
3170
// public static QueryExpressionClause Null {
3172
// return NullQueryExpressionClause.Instance;
3177
// internal sealed class NullQueryExpressionClause : QueryExpressionClause {
3179
// internal static NullQueryExpressionClause Instance = new NullQueryExpressionClause();
3181
// public override bool IsNull {
3187
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3191
// public override string ToString() {
3192
// return "[NullQueryExpressionClause]";
3196
// public class QueryExpressionDistinctClause : QueryExpressionClause {
3198
// public QueryExpressionDistinctClause() {
3201
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3202
// return visitor.VisitQueryExpressionDistinctClause(this, data);
3205
// public override string ToString() {
3206
// return "[QueryExpressionDistinctClause]";
3210
// public class QueryExpressionFromClause : QueryExpressionClause {
3212
// List<CollectionRangeVariable> sources;
3214
// public List<CollectionRangeVariable> Sources {
3219
// sources = value ?? new List<CollectionRangeVariable>();
3223
// public QueryExpressionFromClause() {
3224
// sources = new List<CollectionRangeVariable>();
3227
// public new static QueryExpressionFromClause Null {
3229
// return NullQueryExpressionFromClause.Instance;
3233
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3234
// return visitor.VisitQueryExpressionFromClause(this, data);
3237
// public override string ToString() {
3238
// return string.Format("[QueryExpressionFromClause Sources={0}]", GetCollectionString(Sources));
3242
// internal sealed class NullQueryExpressionFromClause : QueryExpressionFromClause {
3244
// internal static NullQueryExpressionFromClause Instance = new NullQueryExpressionFromClause();
3246
// public override bool IsNull {
3252
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3256
// public override string ToString() {
3257
// return "[NullQueryExpressionFromClause]";
3261
// public class QueryExpressionGroupClause : QueryExpressionClause {
3263
// Expression projection;
3265
// Expression groupBy;
3267
// public Expression Projection {
3269
// return projection;
3272
// projection = value ?? Expression.Null;
3273
// if (!projection.IsNull) projection.Parent = this;
3277
// public Expression GroupBy {
3282
// groupBy = value ?? Expression.Null;
3283
// if (!groupBy.IsNull) groupBy.Parent = this;
3287
// public QueryExpressionGroupClause() {
3288
// projection = Expression.Null;
3289
// groupBy = Expression.Null;
3292
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3293
// return visitor.VisitQueryExpressionGroupClause(this, data);
3296
// public override string ToString() {
3297
// return string.Format("[QueryExpressionGroupClause Projection={0} GroupBy={1}]", Projection, GroupBy);
3301
// public class QueryExpressionGroupJoinVBClause : QueryExpressionClause {
3303
// QueryExpressionJoinVBClause joinClause;
3305
// List<ExpressionRangeVariable> intoVariables;
3307
// public QueryExpressionJoinVBClause JoinClause {
3309
// return joinClause;
3312
// joinClause = value ?? QueryExpressionJoinVBClause.Null;
3313
// if (!joinClause.IsNull) joinClause.Parent = this;
3317
// public List<ExpressionRangeVariable> IntoVariables {
3319
// return intoVariables;
3322
// intoVariables = value ?? new List<ExpressionRangeVariable>();
3326
// public QueryExpressionGroupJoinVBClause() {
3327
// joinClause = QueryExpressionJoinVBClause.Null;
3328
// intoVariables = new List<ExpressionRangeVariable>();
3331
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3332
// return visitor.VisitQueryExpressionGroupJoinVBClause(this, data);
3335
// public override string ToString() {
3336
// return string.Format("[QueryExpressionGroupJoinVBClause JoinClause={0} IntoVariables={1}]", JoinClause, GetCollectionString(IntoVariables));
3340
// public class QueryExpressionGroupVBClause : QueryExpressionClause {
3342
// List<ExpressionRangeVariable> groupVariables;
3344
// List<ExpressionRangeVariable> byVariables;
3346
// List<ExpressionRangeVariable> intoVariables;
3348
// public List<ExpressionRangeVariable> GroupVariables {
3350
// return groupVariables;
3353
// groupVariables = value ?? new List<ExpressionRangeVariable>();
3357
// public List<ExpressionRangeVariable> ByVariables {
3359
// return byVariables;
3362
// byVariables = value ?? new List<ExpressionRangeVariable>();
3366
// public List<ExpressionRangeVariable> IntoVariables {
3368
// return intoVariables;
3371
// intoVariables = value ?? new List<ExpressionRangeVariable>();
3375
// public QueryExpressionGroupVBClause() {
3376
// groupVariables = new List<ExpressionRangeVariable>();
3377
// byVariables = new List<ExpressionRangeVariable>();
3378
// intoVariables = new List<ExpressionRangeVariable>();
3381
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3382
// return visitor.VisitQueryExpressionGroupVBClause(this, data);
3385
// public override string ToString() {
3386
// return string.Format("[QueryExpressionGroupVBClause GroupVariables={0} ByVariables={1} IntoVariables={2" +
3387
// "}]", GetCollectionString(GroupVariables), GetCollectionString(ByVariables), GetCollectionString(IntoVariables));
3391
// public class QueryExpressionJoinClause : QueryExpressionClause {
3393
// Expression onExpression;
3395
// Expression equalsExpression;
3397
// CollectionRangeVariable source;
3399
// string intoIdentifier;
3401
// public Expression OnExpression {
3403
// return onExpression;
3406
// onExpression = value ?? Expression.Null;
3407
// if (!onExpression.IsNull) onExpression.Parent = this;
3411
// public Expression EqualsExpression {
3413
// return equalsExpression;
3416
// equalsExpression = value ?? Expression.Null;
3417
// if (!equalsExpression.IsNull) equalsExpression.Parent = this;
3421
// public CollectionRangeVariable Source {
3426
// source = value ?? CollectionRangeVariable.Null;
3427
// if (!source.IsNull) source.Parent = this;
3431
// public string IntoIdentifier {
3433
// return intoIdentifier;
3436
// intoIdentifier = value ?? "";
3440
// public QueryExpressionJoinClause() {
3441
// onExpression = Expression.Null;
3442
// equalsExpression = Expression.Null;
3443
// source = CollectionRangeVariable.Null;
3444
// intoIdentifier = "";
3447
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3448
// return visitor.VisitQueryExpressionJoinClause(this, data);
3451
// public override string ToString() {
3452
// return string.Format("[QueryExpressionJoinClause OnExpression={0} EqualsExpression={1} Source={2} IntoI" +
3453
// "dentifier={3}]", OnExpression, EqualsExpression, Source, IntoIdentifier);
3457
// public class QueryExpressionJoinConditionVB : AbstractNode {
3459
// Expression leftSide;
3461
// Expression rightSide;
3463
// public Expression LeftSide {
3468
// leftSide = value ?? Expression.Null;
3469
// if (!leftSide.IsNull) leftSide.Parent = this;
3473
// public Expression RightSide {
3475
// return rightSide;
3478
// rightSide = value ?? Expression.Null;
3479
// if (!rightSide.IsNull) rightSide.Parent = this;
3483
// public QueryExpressionJoinConditionVB() {
3484
// leftSide = Expression.Null;
3485
// rightSide = Expression.Null;
3488
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3489
// return visitor.VisitQueryExpressionJoinConditionVB(this, data);
3492
// public override string ToString() {
3493
// return string.Format("[QueryExpressionJoinConditionVB LeftSide={0} RightSide={1}]", LeftSide, RightSide);
3497
// public class QueryExpressionJoinVBClause : QueryExpressionClause {
3499
// CollectionRangeVariable joinVariable;
3501
// QueryExpressionJoinVBClause subJoin;
3503
// List<QueryExpressionJoinConditionVB> conditions;
3505
// public CollectionRangeVariable JoinVariable {
3507
// return joinVariable;
3510
// joinVariable = value ?? CollectionRangeVariable.Null;
3511
// if (!joinVariable.IsNull) joinVariable.Parent = this;
3515
// public QueryExpressionJoinVBClause SubJoin {
3520
// subJoin = value ?? QueryExpressionJoinVBClause.Null;
3521
// if (!subJoin.IsNull) subJoin.Parent = this;
3525
// public List<QueryExpressionJoinConditionVB> Conditions {
3527
// return conditions;
3530
// conditions = value ?? new List<QueryExpressionJoinConditionVB>();
3534
// public QueryExpressionJoinVBClause() {
3535
// joinVariable = CollectionRangeVariable.Null;
3536
// subJoin = QueryExpressionJoinVBClause.Null;
3537
// conditions = new List<QueryExpressionJoinConditionVB>();
3540
// public new static QueryExpressionJoinVBClause Null {
3542
// return NullQueryExpressionJoinVBClause.Instance;
3546
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3547
// return visitor.VisitQueryExpressionJoinVBClause(this, data);
3550
// public override string ToString() {
3551
// return string.Format("[QueryExpressionJoinVBClause JoinVariable={0} SubJoin={1} Conditions={2}]", JoinVariable, SubJoin, GetCollectionString(Conditions));
3555
// internal sealed class NullQueryExpressionJoinVBClause : QueryExpressionJoinVBClause {
3557
// internal static NullQueryExpressionJoinVBClause Instance = new NullQueryExpressionJoinVBClause();
3559
// public override bool IsNull {
3565
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3569
// public override string ToString() {
3570
// return "[NullQueryExpressionJoinVBClause]";
3574
// public class QueryExpressionLetClause : QueryExpressionClause {
3576
// List<ExpressionRangeVariable> variables;
3578
// public List<ExpressionRangeVariable> Variables {
3580
// return variables;
3583
// variables = value ?? new List<ExpressionRangeVariable>();
3587
// public QueryExpressionLetClause() {
3588
// variables = new List<ExpressionRangeVariable>();
3591
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3592
// return visitor.VisitQueryExpressionLetVBClause(this, data);
3595
// public override string ToString() {
3596
// return string.Format("[QueryExpressionLetVBClause Variables={0}]", GetCollectionString(Variables));
3600
// public class QueryExpressionOrderClause : QueryExpressionClause {
3602
// List<QueryExpressionOrdering> orderings;
3604
// public List<QueryExpressionOrdering> Orderings {
3606
// return orderings;
3609
// orderings = value ?? new List<QueryExpressionOrdering>();
3613
// public QueryExpressionOrderClause() {
3614
// orderings = new List<QueryExpressionOrdering>();
3617
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3618
// return visitor.VisitQueryExpressionOrderClause(this, data);
3621
// public override string ToString() {
3622
// return string.Format("[QueryExpressionOrderClause Orderings={0}]", GetCollectionString(Orderings));
3626
// public class QueryExpressionOrdering : AbstractNode {
3628
// Expression criteria;
3630
// QueryExpressionOrderingDirection direction;
3632
// public Expression Criteria {
3637
// criteria = value ?? Expression.Null;
3638
// if (!criteria.IsNull) criteria.Parent = this;
3642
// public QueryExpressionOrderingDirection Direction {
3644
// return direction;
3647
// direction = value;
3651
// public QueryExpressionOrdering() {
3652
// criteria = Expression.Null;
3655
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3656
// return visitor.VisitQueryExpressionOrdering(this, data);
3659
// public override string ToString() {
3660
// return string.Format("[QueryExpressionOrdering Criteria={0} Direction={1}]", Criteria, Direction);
3664
// public class QueryExpressionPartitionVBClause : QueryExpressionClause {
3666
// Expression expression;
3668
// QueryExpressionPartitionType partitionType;
3670
// public Expression Expression {
3672
// return expression;
3675
// expression = value ?? Expression.Null;
3676
// if (!expression.IsNull) expression.Parent = this;
3680
// public QueryExpressionPartitionType PartitionType {
3682
// return partitionType;
3685
// partitionType = value;
3689
// public QueryExpressionPartitionVBClause() {
3690
// expression = Expression.Null;
3693
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3694
// return visitor.VisitQueryExpressionPartitionVBClause(this, data);
3697
// public override string ToString() {
3698
// return string.Format("[QueryExpressionPartitionVBClause Expression={0} PartitionType={1}]", Expression, PartitionType);
3702
// public class QueryExpressionSelectClause : QueryExpressionClause {
3704
// Expression projection;
3706
// public Expression Projection {
3708
// return projection;
3711
// projection = value ?? Expression.Null;
3712
// if (!projection.IsNull) projection.Parent = this;
3716
// public QueryExpressionSelectClause() {
3717
// projection = Expression.Null;
3720
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3721
// return visitor.VisitQueryExpressionSelectClause(this, data);
3724
// public override string ToString() {
3725
// return string.Format("[QueryExpressionSelectClause Projection={0}]", Projection);
3729
// public class QueryExpressionSelectVBClause : QueryExpressionClause {
3731
// List<ExpressionRangeVariable> variables;
3733
// public List<ExpressionRangeVariable> Variables {
3735
// return variables;
3738
// variables = value ?? new List<ExpressionRangeVariable>();
3742
// public QueryExpressionSelectVBClause() {
3743
// variables = new List<ExpressionRangeVariable>();
3746
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3747
// return visitor.VisitQueryExpressionSelectVBClause(this, data);
3750
// public override string ToString() {
3751
// return string.Format("[QueryExpressionSelectVBClause Variables={0}]", GetCollectionString(Variables));
3755
// public class QueryExpressionWhereClause : QueryExpressionClause {
3757
// Expression condition;
3759
// public Expression Condition {
3761
// return condition;
3764
// condition = value ?? Expression.Null;
3765
// if (!condition.IsNull) condition.Parent = this;
3769
// public QueryExpressionWhereClause() {
3770
// condition = Expression.Null;
3773
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3774
// return visitor.VisitQueryExpressionWhereClause(this, data);
3777
// public override string ToString() {
3778
// return string.Format("[QueryExpressionWhereClause Condition={0}]", Condition);
3782
// public class RaiseEventStatement : Statement {
3784
// string eventName;
3786
// List<Expression> arguments;
3788
// public string EventName {
3790
// return eventName;
3793
// eventName = value ?? "";
3797
// public List<Expression> Arguments {
3799
// return arguments;
3802
// arguments = value ?? new List<Expression>();
3806
// public RaiseEventStatement(string eventName, List<Expression> arguments) {
3807
// EventName = eventName;
3808
// Arguments = arguments;
3811
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3812
// return visitor.VisitRaiseEventStatement(this, data);
3815
// public override string ToString() {
3816
// return string.Format("[RaiseEventStatement EventName={0} Arguments={1}]", EventName, GetCollectionString(Arguments));
3820
// public class ReDimStatement : Statement {
3822
// List<InvocationExpression> reDimClauses;
3826
// public List<InvocationExpression> ReDimClauses {
3828
// return reDimClauses;
3831
// reDimClauses = value ?? new List<InvocationExpression>();
3835
// public bool IsPreserve {
3837
// return isPreserve;
3840
// isPreserve = value;
3844
// public ReDimStatement(bool isPreserve) {
3845
// IsPreserve = isPreserve;
3846
// reDimClauses = new List<InvocationExpression>();
3849
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3850
// return visitor.VisitReDimStatement(this, data);
3853
// public override string ToString() {
3854
// return string.Format("[ReDimStatement ReDimClauses={0} IsPreserve={1}]", GetCollectionString(ReDimClauses), IsPreserve);
3858
// public class RemoveHandlerStatement : Statement {
3860
// Expression eventExpression;
3862
// Expression handlerExpression;
3864
// public Expression EventExpression {
3866
// return eventExpression;
3869
// eventExpression = value ?? Expression.Null;
3870
// if (!eventExpression.IsNull) eventExpression.Parent = this;
3874
// public Expression HandlerExpression {
3876
// return handlerExpression;
3879
// handlerExpression = value ?? Expression.Null;
3880
// if (!handlerExpression.IsNull) handlerExpression.Parent = this;
3884
// public RemoveHandlerStatement(Expression eventExpression, Expression handlerExpression) {
3885
// EventExpression = eventExpression;
3886
// HandlerExpression = handlerExpression;
3889
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3890
// return visitor.VisitRemoveHandlerStatement(this, data);
3893
// public override string ToString() {
3894
// return string.Format("[RemoveHandlerStatement EventExpression={0} HandlerExpression={1}]", EventExpression, HandlerExpression);
3898
// public class ResumeStatement : Statement {
3900
// string labelName;
3902
// bool isResumeNext;
3904
// public string LabelName {
3906
// return labelName;
3909
// labelName = value ?? "";
3913
// public bool IsResumeNext {
3915
// return isResumeNext;
3918
// isResumeNext = value;
3922
// public ResumeStatement(bool isResumeNext) {
3923
// IsResumeNext = isResumeNext;
3927
// public ResumeStatement(string labelName) {
3928
// LabelName = labelName;
3931
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3932
// return visitor.VisitResumeStatement(this, data);
3935
// public override string ToString() {
3936
// return string.Format("[ResumeStatement LabelName={0} IsResumeNext={1}]", LabelName, IsResumeNext);
3940
// public class ReturnStatement : Statement {
3942
// Expression expression;
3944
// public Expression Expression {
3946
// return expression;
3949
// expression = value ?? Expression.Null;
3950
// if (!expression.IsNull) expression.Parent = this;
3954
// public ReturnStatement(Expression expression) {
3955
// Expression = expression;
3958
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3959
// return visitor.VisitReturnStatement(this, data);
3962
// public override string ToString() {
3963
// return string.Format("[ReturnStatement Expression={0}]", Expression);
3967
// public class StopStatement : Statement {
3969
// public StopStatement() {
3972
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
3973
// return visitor.VisitStopStatement(this, data);
3976
// public override string ToString() {
3977
// return "[StopStatement]";
3981
// public class SwitchSection : BlockStatement {
3983
// List<CaseLabel> switchLabels;
3985
// public List<CaseLabel> SwitchLabels {
3987
// return switchLabels;
3990
// switchLabels = value ?? new List<CaseLabel>();
3994
// public SwitchSection() {
3995
// switchLabels = new List<CaseLabel>();
3998
// public SwitchSection(List<CaseLabel> switchLabels) {
3999
// SwitchLabels = switchLabels;
4002
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4003
// return visitor.VisitSwitchSection(this, data);
4006
// public override string ToString() {
4007
// return string.Format("[SwitchSection SwitchLabels={0}]", GetCollectionString(SwitchLabels));
4011
// public class SwitchStatement : Statement {
4013
// Expression switchExpression;
4015
// List<SwitchSection> switchSections;
4017
// public Expression SwitchExpression {
4019
// return switchExpression;
4022
// switchExpression = value ?? Expression.Null;
4023
// if (!switchExpression.IsNull) switchExpression.Parent = this;
4027
// public List<SwitchSection> SwitchSections {
4029
// return switchSections;
4032
// switchSections = value ?? new List<SwitchSection>();
4036
// public SwitchStatement(Expression switchExpression, List<SwitchSection> switchSections) {
4037
// SwitchExpression = switchExpression;
4038
// SwitchSections = switchSections;
4041
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4042
// return visitor.VisitSwitchStatement(this, data);
4045
// public override string ToString() {
4046
// return string.Format("[SwitchStatement SwitchExpression={0} SwitchSections={1}]", SwitchExpression, GetCollectionString(SwitchSections));
4050
// public class TemplateDefinition : AttributedNode {
4054
// VarianceModifier varianceModifier;
4056
// List<TypeReference> bases;
4058
// public string Name {
4063
// name = string.IsNullOrEmpty(value) ? "?" : value;
4067
// public VarianceModifier VarianceModifier {
4069
// return varianceModifier;
4072
// varianceModifier = value;
4076
// public List<TypeReference> Bases {
4081
// bases = value ?? new List<TypeReference>();
4085
// public TemplateDefinition() {
4087
// bases = new List<TypeReference>();
4090
// public TemplateDefinition(string name, List<AttributeSection> attributes) {
4092
// Attributes = attributes;
4093
// bases = new List<TypeReference>();
4096
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4097
// return visitor.VisitTemplateDefinition(this, data);
4100
// public override string ToString() {
4101
// return string.Format("[TemplateDefinition Name={0} VarianceModifier={1} Bases={2} Attributes={3} Modifi" +
4102
// "er={4}]", Name, VarianceModifier, GetCollectionString(Bases), GetCollectionString(Attributes), Modifier);
4106
// public class ThisReferenceExpression : Expression {
4108
// public ThisReferenceExpression() {
4111
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4112
// return visitor.VisitThisReferenceExpression(this, data);
4115
// public override string ToString() {
4116
// return "[ThisReferenceExpression]";
4120
// public class ThrowStatement : Statement {
4122
// Expression expression;
4124
// public Expression Expression {
4126
// return expression;
4129
// expression = value ?? Expression.Null;
4130
// if (!expression.IsNull) expression.Parent = this;
4134
// public ThrowStatement(Expression expression) {
4135
// Expression = expression;
4138
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4139
// return visitor.VisitThrowStatement(this, data);
4142
// public override string ToString() {
4143
// return string.Format("[ThrowStatement Expression={0}]", Expression);
4147
// public class TryCatchStatement : Statement {
4149
// Statement statementBlock;
4151
// List<CatchClause> catchClauses;
4153
// Statement finallyBlock;
4155
// public Statement StatementBlock {
4157
// return statementBlock;
4160
// statementBlock = value ?? Statement.Null;
4161
// if (!statementBlock.IsNull) statementBlock.Parent = this;
4165
// public List<CatchClause> CatchClauses {
4167
// return catchClauses;
4170
// catchClauses = value ?? new List<CatchClause>();
4174
// public Statement FinallyBlock {
4176
// return finallyBlock;
4179
// finallyBlock = value ?? Statement.Null;
4180
// if (!finallyBlock.IsNull) finallyBlock.Parent = this;
4184
// public TryCatchStatement(Statement statementBlock, List<CatchClause> catchClauses, Statement finallyBlock) {
4185
// StatementBlock = statementBlock;
4186
// CatchClauses = catchClauses;
4187
// FinallyBlock = finallyBlock;
4190
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4191
// return visitor.VisitTryCatchStatement(this, data);
4194
// public override string ToString() {
4195
// return string.Format("[TryCatchStatement StatementBlock={0} CatchClauses={1} FinallyBlock={2}]", StatementBlock, GetCollectionString(CatchClauses), FinallyBlock);
4199
// public class TypeDeclaration : AttributedNode {
4205
// List<TypeReference> baseTypes;
4207
// List<TemplateDefinition> templates;
4209
// Location bodyStartLocation;
4211
// public string Name {
4216
// name = value ?? "";
4220
// public ClassType Type {
4229
// public List<TypeReference> BaseTypes {
4231
// return baseTypes;
4234
// baseTypes = value ?? new List<TypeReference>();
4238
// public List<TemplateDefinition> Templates {
4240
// return templates;
4243
// templates = value ?? new List<TemplateDefinition>();
4247
// public Location BodyStartLocation {
4249
// return bodyStartLocation;
4252
// bodyStartLocation = value;
4256
// public TypeDeclaration(Modifiers modifier, List<AttributeSection> attributes) {
4257
// Modifier = modifier;
4258
// Attributes = attributes;
4260
// baseTypes = new List<TypeReference>();
4261
// templates = new List<TemplateDefinition>();
4262
// bodyStartLocation = Location.Empty;
4265
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4266
// return visitor.VisitTypeDeclaration(this, data);
4269
// public override string ToString() {
4270
// return string.Format("[TypeDeclaration Name={0} Type={1} BaseTypes={2} Templates={3} BodyStartLocation=" +
4271
// "{4} Attributes={5} Modifier={6}]", Name, Type, GetCollectionString(BaseTypes), GetCollectionString(Templates), BodyStartLocation, GetCollectionString(Attributes), Modifier);
4275
// public class TypeOfExpression : Expression {
4277
// TypeReference typeReference;
4279
// public TypeReference TypeReference {
4281
// return typeReference;
4284
// typeReference = value ?? TypeReference.Null;
4285
// if (!typeReference.IsNull) typeReference.Parent = this;
4289
// public TypeOfExpression(TypeReference typeReference) {
4290
// TypeReference = typeReference;
4293
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4294
// return visitor.VisitTypeOfExpression(this, data);
4297
// public override string ToString() {
4298
// return string.Format("[TypeOfExpression TypeReference={0}]", TypeReference);
4302
// public class TypeOfIsExpression : Expression {
4304
// Expression expression;
4306
// TypeReference typeReference;
4308
// public Expression Expression {
4310
// return expression;
4313
// expression = value ?? Expression.Null;
4314
// if (!expression.IsNull) expression.Parent = this;
4318
// public TypeReference TypeReference {
4320
// return typeReference;
4323
// typeReference = value ?? TypeReference.Null;
4324
// if (!typeReference.IsNull) typeReference.Parent = this;
4328
// public TypeOfIsExpression(Expression expression, TypeReference typeReference) {
4329
// Expression = expression;
4330
// TypeReference = typeReference;
4333
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4334
// return visitor.VisitTypeOfIsExpression(this, data);
4337
// public override string ToString() {
4338
// return string.Format("[TypeOfIsExpression Expression={0} TypeReference={1}]", Expression, TypeReference);
4342
// public class TypeReferenceExpression : Expression {
4344
// TypeReference typeReference;
4346
// public TypeReference TypeReference {
4348
// return typeReference;
4351
// typeReference = value ?? TypeReference.Null;
4352
// if (!typeReference.IsNull) typeReference.Parent = this;
4356
// public TypeReferenceExpression(TypeReference typeReference) {
4357
// TypeReference = typeReference;
4360
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4361
// return visitor.VisitTypeReferenceExpression(this, data);
4364
// public override string ToString() {
4365
// return string.Format("[TypeReferenceExpression TypeReference={0}]", TypeReference);
4369
// public class UnaryOperatorExpression : Expression {
4371
// UnaryOperatorType op;
4373
// Expression expression;
4375
// public UnaryOperatorType Op {
4384
// public Expression Expression {
4386
// return expression;
4389
// expression = value ?? Expression.Null;
4390
// if (!expression.IsNull) expression.Parent = this;
4394
// public UnaryOperatorExpression(UnaryOperatorType op) {
4396
// expression = Expression.Null;
4399
// public UnaryOperatorExpression(Expression expression, UnaryOperatorType op) {
4400
// Expression = expression;
4404
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4405
// return visitor.VisitUnaryOperatorExpression(this, data);
4408
// public override string ToString() {
4409
// return string.Format("[UnaryOperatorExpression Op={0} Expression={1}]", Op, Expression);
4413
// public class UsingStatement : StatementWithEmbeddedStatement {
4415
// Statement resourceAcquisition;
4417
// public Statement ResourceAcquisition {
4419
// return resourceAcquisition;
4422
// resourceAcquisition = value ?? Statement.Null;
4423
// if (!resourceAcquisition.IsNull) resourceAcquisition.Parent = this;
4427
// public UsingStatement(Statement resourceAcquisition, Statement embeddedStatement) {
4428
// ResourceAcquisition = resourceAcquisition;
4429
// EmbeddedStatement = embeddedStatement;
4432
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4433
// return visitor.VisitUsingStatement(this, data);
4436
// public override string ToString() {
4437
// return string.Format("[UsingStatement ResourceAcquisition={0} EmbeddedStatement={1}]", ResourceAcquisition, EmbeddedStatement);
4441
// public class VariableDeclaration : AbstractNode {
4445
// Expression initializer;
4447
// TypeReference typeReference;
4449
// Expression fixedArrayInitialization;
4451
// public string Name {
4456
// name = value ?? "";
4460
// public Expression Initializer {
4462
// return initializer;
4465
// initializer = value ?? Expression.Null;
4466
// if (!initializer.IsNull) initializer.Parent = this;
4470
// public TypeReference TypeReference {
4472
// return typeReference;
4475
// typeReference = value ?? TypeReference.Null;
4476
// if (!typeReference.IsNull) typeReference.Parent = this;
4480
// public Expression FixedArrayInitialization {
4482
// return fixedArrayInitialization;
4485
// fixedArrayInitialization = value ?? Expression.Null;
4486
// if (!fixedArrayInitialization.IsNull) fixedArrayInitialization.Parent = this;
4490
// public VariableDeclaration(string name) {
4492
// initializer = Expression.Null;
4493
// typeReference = TypeReference.Null;
4494
// fixedArrayInitialization = Expression.Null;
4497
// public VariableDeclaration(string name, Expression initializer) {
4499
// Initializer = initializer;
4500
// typeReference = TypeReference.Null;
4501
// fixedArrayInitialization = Expression.Null;
4504
// public VariableDeclaration(string name, Expression initializer, TypeReference typeReference) {
4506
// Initializer = initializer;
4507
// TypeReference = typeReference;
4508
// fixedArrayInitialization = Expression.Null;
4511
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4512
// return visitor.VisitVariableDeclaration(this, data);
4515
// public override string ToString() {
4516
// return string.Format("[VariableDeclaration Name={0} Initializer={1} TypeReference={2} FixedArrayInitial" +
4517
// "ization={3}]", Name, Initializer, TypeReference, FixedArrayInitialization);
4521
// public class WithStatement : Statement {
4523
// Expression expression;
4525
// BlockStatement body;
4527
// public Expression Expression {
4529
// return expression;
4532
// expression = value ?? Expression.Null;
4533
// if (!expression.IsNull) expression.Parent = this;
4537
// public BlockStatement Body {
4542
// body = value ?? BlockStatement.Null;
4543
// if (!body.IsNull) body.Parent = this;
4547
// public WithStatement(Expression expression) {
4548
// Expression = expression;
4549
// body = BlockStatement.Null;
4552
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4553
// return visitor.VisitWithStatement(this, data);
4556
// public override string ToString() {
4557
// return string.Format("[WithStatement Expression={0} Body={1}]", Expression, Body);
4561
// public class XmlAttributeExpression : XmlExpression {
4565
// string literalValue;
4567
// bool useDoubleQuotes;
4569
// Expression expressionValue;
4571
// public string Name {
4576
// name = value ?? "";
4580
// public string LiteralValue {
4582
// return literalValue;
4585
// literalValue = value ?? "";
4589
// public bool UseDoubleQuotes {
4591
// return useDoubleQuotes;
4594
// useDoubleQuotes = value;
4598
// public Expression ExpressionValue {
4600
// return expressionValue;
4603
// expressionValue = value ?? Expression.Null;
4604
// if (!expressionValue.IsNull) expressionValue.Parent = this;
4608
// public XmlAttributeExpression() {
4610
// literalValue = "";
4611
// expressionValue = Expression.Null;
4614
// public bool IsLiteralValue {
4616
// return expressionValue.IsNull;
4620
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4621
// return visitor.VisitXmlAttributeExpression(this, data);
4624
// public override string ToString() {
4625
// return string.Format("[XmlAttributeExpression Name={0} LiteralValue={1} UseDoubleQuotes={2} ExpressionV" +
4626
// "alue={3}]", Name, LiteralValue, UseDoubleQuotes, ExpressionValue);
4630
// public class XmlContentExpression : XmlExpression {
4634
// XmlContentType type;
4636
// public string Content {
4641
// content = value ?? "";
4645
// public XmlContentType Type {
4654
// public XmlContentExpression(string content, XmlContentType type) {
4655
// Content = content;
4659
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4660
// return visitor.VisitXmlContentExpression(this, data);
4663
// public override string ToString() {
4664
// return string.Format("[XmlContentExpression Content={0} Type={1}]", Content, Type);
4668
// public class XmlDocumentExpression : XmlExpression {
4670
// List<XmlExpression> expressions;
4672
// public List<XmlExpression> Expressions {
4674
// return expressions;
4677
// expressions = value ?? new List<XmlExpression>();
4681
// public XmlDocumentExpression() {
4682
// expressions = new List<XmlExpression>();
4685
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4686
// return visitor.VisitXmlDocumentExpression(this, data);
4689
// public override string ToString() {
4690
// return string.Format("[XmlDocumentExpression Expressions={0}]", GetCollectionString(Expressions));
4694
// public class XmlElementExpression : XmlExpression {
4696
// Expression content;
4698
// Expression nameExpression;
4702
// List<XmlExpression> attributes;
4704
// public Expression Content {
4709
// content = value ?? Expression.Null;
4710
// if (!content.IsNull) content.Parent = this;
4714
// public Expression NameExpression {
4716
// return nameExpression;
4719
// nameExpression = value ?? Expression.Null;
4720
// if (!nameExpression.IsNull) nameExpression.Parent = this;
4724
// public string XmlName {
4729
// xmlName = value ?? "";
4733
// public List<XmlExpression> Attributes {
4735
// return attributes;
4738
// attributes = value ?? new List<XmlExpression>();
4742
// public XmlElementExpression() {
4743
// content = Expression.Null;
4744
// nameExpression = Expression.Null;
4746
// attributes = new List<XmlExpression>();
4749
// public bool IsExpression {
4751
// return !content.IsNull;
4755
// public bool NameIsExpression {
4757
// return !nameExpression.IsNull;
4761
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4762
// return visitor.VisitXmlElementExpression(this, data);
4765
// public override string ToString() {
4766
// return string.Format("[XmlElementExpression Content={0} NameExpression={1} XmlName={2} Attributes={3}]", Content, NameExpression, XmlName, GetCollectionString(Attributes));
4770
// public class XmlEmbeddedExpression : XmlExpression {
4772
// Expression inlineVBExpression;
4774
// public Expression InlineVBExpression {
4776
// return inlineVBExpression;
4779
// inlineVBExpression = value ?? Expression.Null;
4780
// if (!inlineVBExpression.IsNull) inlineVBExpression.Parent = this;
4784
// public XmlEmbeddedExpression() {
4785
// inlineVBExpression = Expression.Null;
4788
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4789
// return visitor.VisitXmlEmbeddedExpression(this, data);
4792
// public override string ToString() {
4793
// return string.Format("[XmlEmbeddedExpression InlineVBExpression={0}]", InlineVBExpression);
4797
// public abstract class XmlExpression : Expression {
4799
// protected XmlExpression() {
4803
// public class XmlMemberAccessExpression : Expression {
4805
// Expression targetObject;
4807
// XmlAxisType axisType;
4809
// bool isXmlIdentifier;
4811
// string identifier;
4813
// public Expression TargetObject {
4815
// return targetObject;
4818
// targetObject = value ?? Expression.Null;
4819
// if (!targetObject.IsNull) targetObject.Parent = this;
4823
// public XmlAxisType AxisType {
4828
// axisType = value;
4832
// public bool IsXmlIdentifier {
4834
// return isXmlIdentifier;
4837
// isXmlIdentifier = value;
4841
// public string Identifier {
4843
// return identifier;
4846
// identifier = value ?? "";
4850
// public XmlMemberAccessExpression(Expression targetObject, XmlAxisType axisType, string identifier, bool isXmlIdentifier) {
4851
// TargetObject = targetObject;
4852
// AxisType = axisType;
4853
// Identifier = identifier;
4854
// IsXmlIdentifier = isXmlIdentifier;
4857
// public override object AcceptVisitor(IAstVisitor visitor, object data) {
4858
// return visitor.VisitXmlMemberAccessExpression(this, data);
4861
// public override string ToString() {
4862
// return string.Format("[XmlMemberAccessExpression TargetObject={0} AxisType={1} IsXmlIdentifier={2} Iden" +
4863
// "tifier={3}]", TargetObject, AxisType, IsXmlIdentifier, Identifier);