Наследование: ICSharpCode.NRefactory.Ast.Expression
Пример #1
0
		public override object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data)
		{
			WriteLine("VisitCollectionInitializerExpression");
			return base.VisitCollectionInitializerExpression(collectionInitializerExpression, data);
		}
		public virtual object TrackedVisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data) {
			return base.VisitCollectionInitializerExpression(collectionInitializerExpression, data);
		}
Пример #3
0
	void ObjectCreateExpression(
//#line  2123 "VBNET.ATG" 
out Expression oce) {

//#line  2125 "VBNET.ATG" 
		TypeReference type = null;
		CollectionInitializerExpression initializer = null;
		List<Expression> arguments = null;
		ArrayList dimensions = null;
		oce = null;
		Location startLocation = la.Location;
		bool canBeNormal; bool canBeReDim;
		
		Expect(162);
		if (StartOf(8)) {
			NonArrayTypeName(
//#line  2134 "VBNET.ATG" 
out type, false);
			if (la.kind == 37) {
				lexer.NextToken();
				NormalOrReDimArgumentList(
//#line  2135 "VBNET.ATG" 
out arguments, out canBeNormal, out canBeReDim);
				Expect(38);
				if (la.kind == 35 || 
//#line  2136 "VBNET.ATG" 
la.kind == Tokens.OpenParenthesis) {
					if (
//#line  2136 "VBNET.ATG" 
la.kind == Tokens.OpenParenthesis) {
						ArrayTypeModifiers(
//#line  2137 "VBNET.ATG" 
out dimensions);
						CollectionInitializer(
//#line  2138 "VBNET.ATG" 
out initializer);
					} else {
						CollectionInitializer(
//#line  2139 "VBNET.ATG" 
out initializer);
					}
				}

//#line  2141 "VBNET.ATG" 
				if (canBeReDim && !canBeNormal && initializer == null) initializer = new CollectionInitializerExpression(); 
			}
		}

//#line  2145 "VBNET.ATG" 
		if (initializer == null) {
		oce = new ObjectCreateExpression(type, arguments);
		} else {
			if (dimensions == null) dimensions = new ArrayList();
			dimensions.Insert(0, (arguments == null) ? 0 : Math.Max(arguments.Count - 1, 0));
			type.RankSpecifier = (int[])dimensions.ToArray(typeof(int));
			ArrayCreateExpression ace = new ArrayCreateExpression(type, initializer);
			ace.Arguments = arguments;
			oce = ace;
		}
		
		if (la.kind == 126 || la.kind == 233) {
			if (la.kind == 233) {

//#line  2160 "VBNET.ATG" 
				MemberInitializerExpression memberInitializer = null;
				Expression anonymousMember = null;
				
				lexer.NextToken();

//#line  2165 "VBNET.ATG" 
				CollectionInitializerExpression memberInitializers = new CollectionInitializerExpression();
				memberInitializers.StartLocation = la.Location;
				
				Expect(35);
				if (la.kind == 26 || la.kind == 147) {
					MemberInitializer(
//#line  2170 "VBNET.ATG" 
out memberInitializer);

//#line  2171 "VBNET.ATG" 
					memberInitializers.CreateExpressions.Add(memberInitializer); 
				} else if (StartOf(24)) {
					Expr(
//#line  2172 "VBNET.ATG" 
out anonymousMember);

//#line  2173 "VBNET.ATG" 
					memberInitializers.CreateExpressions.Add(anonymousMember); 
				} else SynErr(270);
				while (la.kind == 22) {
					lexer.NextToken();
					if (la.kind == 26 || la.kind == 147) {
						MemberInitializer(
//#line  2177 "VBNET.ATG" 
out memberInitializer);

//#line  2178 "VBNET.ATG" 
						memberInitializers.CreateExpressions.Add(memberInitializer); 
					} else if (StartOf(24)) {
						Expr(
//#line  2179 "VBNET.ATG" 
out anonymousMember);

//#line  2180 "VBNET.ATG" 
						memberInitializers.CreateExpressions.Add(anonymousMember); 
					} else SynErr(271);
				}
				Expect(36);

//#line  2185 "VBNET.ATG" 
				memberInitializers.EndLocation = t.Location;
				if(oce is ObjectCreateExpression)
				{
					((ObjectCreateExpression)oce).ObjectInitializer = memberInitializers;
				}
				
			} else {
				lexer.NextToken();
				CollectionInitializer(
//#line  2195 "VBNET.ATG" 
out initializer);

//#line  2197 "VBNET.ATG" 
				if(oce is ObjectCreateExpression)
				((ObjectCreateExpression)oce).ObjectInitializer = initializer;
				
			}
		}

//#line  2203 "VBNET.ATG" 
		if (oce != null) {
		oce.StartLocation = startLocation;
		oce.EndLocation = t.EndLocation;
		}
		
	}
Пример #4
0
	void ObjectCreateExpression(
#line  1935 "VBNET.ATG" 
out Expression oce) {

#line  1937 "VBNET.ATG" 
		TypeReference type = null;
		Expression initializer = null;
		List<Expression> arguments = null;
		ArrayList dimensions = null;
		oce = null;
		bool canBeNormal; bool canBeReDim;
		
		Expect(148);
		if (StartOf(7)) {
			NonArrayTypeName(
#line  1945 "VBNET.ATG" 
out type, false);
			if (la.kind == 25) {
				lexer.NextToken();
				NormalOrReDimArgumentList(
#line  1946 "VBNET.ATG" 
out arguments, out canBeNormal, out canBeReDim);
				Expect(26);
				if (la.kind == 23 || 
#line  1947 "VBNET.ATG" 
la.kind == Tokens.OpenParenthesis) {
					if (
#line  1947 "VBNET.ATG" 
la.kind == Tokens.OpenParenthesis) {
						ArrayTypeModifiers(
#line  1948 "VBNET.ATG" 
out dimensions);
						CollectionInitializer(
#line  1949 "VBNET.ATG" 
out initializer);
					} else {
						CollectionInitializer(
#line  1950 "VBNET.ATG" 
out initializer);
					}
				}

#line  1952 "VBNET.ATG" 
				if (canBeReDim && !canBeNormal && initializer == null) initializer = new CollectionInitializerExpression(); 
			}
		}

#line  1956 "VBNET.ATG" 
		if (initializer == null) {
		oce = new ObjectCreateExpression(type, arguments);
		} else {
			if (dimensions == null) dimensions = new ArrayList();
			dimensions.Insert(0, (arguments == null) ? 0 : Math.Max(arguments.Count - 1, 0));
			type.RankSpecifier = (int[])dimensions.ToArray(typeof(int));
			ArrayCreateExpression ace = new ArrayCreateExpression(type, initializer as CollectionInitializerExpression);
			ace.Arguments = arguments;
			oce = ace;
		}
		
		if (la.kind == 218) {

#line  1970 "VBNET.ATG" 
			NamedArgumentExpression memberInitializer = null;
			
			lexer.NextToken();

#line  1974 "VBNET.ATG" 
			CollectionInitializerExpression memberInitializers = new CollectionInitializerExpression();
			memberInitializers.StartLocation = la.Location;
			
			Expect(23);
			MemberInitializer(
#line  1978 "VBNET.ATG" 
out memberInitializer);

#line  1979 "VBNET.ATG" 
			memberInitializers.CreateExpressions.Add(memberInitializer); 
			while (la.kind == 12) {
				lexer.NextToken();
				MemberInitializer(
#line  1981 "VBNET.ATG" 
out memberInitializer);

#line  1982 "VBNET.ATG" 
				memberInitializers.CreateExpressions.Add(memberInitializer); 
			}
			Expect(24);

#line  1986 "VBNET.ATG" 
			memberInitializers.EndLocation = t.Location;
			if(oce is ObjectCreateExpression)
			{
				((ObjectCreateExpression)oce).ObjectInitializer = memberInitializers;
			}
			
		}
	}
Пример #5
0
		public virtual object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data) {
			throw new global::System.NotImplementedException("CollectionInitializerExpression");
		}
Пример #6
0
	void ObjectCreateExpression(
#line  1860 "VBNET.ATG" 
out Expression oce) {

#line  1862 "VBNET.ATG" 
		TypeReference type = null;
		Expression initializer = null;
		List<Expression> arguments = null;
		ArrayList dimensions = null;
		oce = null;
		bool canBeNormal; bool canBeReDim;
		
		Expect(127);
		NonArrayTypeName(
#line  1869 "VBNET.ATG" 
out type, false);
		if (la.kind == 24) {
			lexer.NextToken();
			NormalOrReDimArgumentList(
#line  1870 "VBNET.ATG" 
out arguments, out canBeNormal, out canBeReDim);
			Expect(25);
			if (la.kind == 22 || 
#line  1871 "VBNET.ATG" 
la.kind == Tokens.OpenParenthesis) {
				if (
#line  1871 "VBNET.ATG" 
la.kind == Tokens.OpenParenthesis) {
					ArrayTypeModifiers(
#line  1872 "VBNET.ATG" 
out dimensions);
					CollectionInitializer(
#line  1873 "VBNET.ATG" 
out initializer);
				} else {
					CollectionInitializer(
#line  1874 "VBNET.ATG" 
out initializer);
				}
			}

#line  1876 "VBNET.ATG" 
			if (canBeReDim && !canBeNormal && initializer == null) initializer = new CollectionInitializerExpression(); 
		}

#line  1879 "VBNET.ATG" 
		if (type == null) type = new TypeReference("Object"); // fallback type on parser errors
		if (initializer == null) {
			oce = new ObjectCreateExpression(type, arguments);
		} else {
			if (dimensions == null) dimensions = new ArrayList();
			dimensions.Insert(0, (arguments == null) ? 0 : Math.Max(arguments.Count - 1, 0));
			type.RankSpecifier = (int[])dimensions.ToArray(typeof(int));
			ArrayCreateExpression ace = new ArrayCreateExpression(type, initializer as CollectionInitializerExpression);
			ace.Arguments = arguments;
			oce = ace;
		}
		
	}
Пример #7
0
	void CollectionInitializer(
#line  1447 "cs.ATG" 
out Expression outExpr) {

#line  1449 "cs.ATG" 
		Expression expr = null;
		CollectionInitializerExpression initializer = new CollectionInitializerExpression();
		
		Expect(16);

#line  1453 "cs.ATG" 
		initializer.StartLocation = t.Location; 
		if (StartOf(30)) {
			VariableInitializer(
#line  1454 "cs.ATG" 
out expr);

#line  1455 "cs.ATG" 
			SafeAdd(initializer, initializer.CreateExpressions, expr); 
			while (
#line  1456 "cs.ATG" 
NotFinalComma()) {
				Expect(14);
				VariableInitializer(
#line  1457 "cs.ATG" 
out expr);

#line  1458 "cs.ATG" 
				SafeAdd(initializer, initializer.CreateExpressions, expr); 
			}
			if (la.kind == 14) {
				lexer.NextToken();
			}
		}
		Expect(17);

#line  1462 "cs.ATG" 
		initializer.EndLocation = t.Location; outExpr = initializer; 
	}
Пример #8
0
		public ArrayCreateExpression(TypeReference createType, CollectionInitializerExpression arrayInitializer) {
			CreateType = createType;
			ArrayInitializer = arrayInitializer;
			arguments = new List<Expression>();
		}
Пример #9
0
		public ObjectCreateExpression(TypeReference createType, List<Expression> parameters) {
			CreateType = createType;
			Parameters = parameters;
			objectInitializer = CollectionInitializerExpression.Null;
		}
Пример #10
0
		public ArrayCreateExpression(TypeReference createType) {
			CreateType = createType;
			arguments = new List<Expression>();
			arrayInitializer = CollectionInitializerExpression.Null;
		}
Пример #11
0
		public ArrayCreateExpression(TypeReference createType, List<Expression> arguments) {
			CreateType = createType;
			Arguments = arguments;
			arrayInitializer = CollectionInitializerExpression.Null;
		}
Пример #12
0
 public virtual object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data)
 {
     Debug.Assert((collectionInitializerExpression != null));
     Debug.Assert((collectionInitializerExpression.CreateExpressions != null));
     foreach (Expression o in collectionInitializerExpression.CreateExpressions) {
         Debug.Assert(o != null);
         o.AcceptVisitor(this, data);
     }
     return null;
 }
 public object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data)
 {
     throw new NotImplementedException ();
 }
 public virtual bool VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object d)
 {
     if ((collectionInitializerExpression == null)) {
         return SetFailure();
     }
     if ((d == null)) {
         return SetFailure();
     }
     if ((collectionInitializerExpression.CreateExpressions == null)) {
         return SetFailure();
     }
     if(collectionInitializerExpression.GetType() != d.GetType()) {return SetFailure();}
     var data = (CollectionInitializerExpression)d;
     if (!IsMatch(collectionInitializerExpression, data)) {
         return SetFailure();
     }
     if (collectionInitializerExpression.CreateExpressions.Count == data.CreateExpressions.Count) {
     for (int i=0; i<collectionInitializerExpression.CreateExpressions.Count;i++) {
         Expression o = collectionInitializerExpression.CreateExpressions[i];
         if(o == null){return SetFailure();}
         if((bool)o.AcceptVisitor(this, data.CreateExpressions[i]) == false) return SetFailure();
     }			}			else { return SetFailure(); }
     return true;
 }
Пример #15
0
		public override object VisitCollectionInitializerExpression (CollectionInitializerExpression collectionInitializerExpression, object data)
		{
			if (collectionInitializerExpression.CreateExpressions.Count == 0)
				return null;
			DomReturnType type = null;
			IType typeObject = null;
			
			for (int i = 0; i < collectionInitializerExpression.CreateExpressions.Count; i++) {
				DomReturnType curType = (DomReturnType)ResolveType (collectionInitializerExpression.CreateExpressions[i]);
				// if we found object or we have only one create expression we can stop
				if (curType.DecoratedFullName == DomReturnType.Object.DecoratedFullName || collectionInitializerExpression.CreateExpressions.Count == 1) {
					type = curType;
					break;
				}
				IType curTypeObject = resolver.Dom.GetType (curType);
				if (curTypeObject == null)
					continue;
				if (type == null || resolver.Dom.GetInheritanceTree (typeObject).Any (t => t.DecoratedFullName == curTypeObject.DecoratedFullName)) {
					type = curType;
					typeObject = curTypeObject;
				}
			}
			
			if (type != null)
				type.ArrayDimensions++;
			return CreateResult (type);
		}
		public virtual object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data) {
			Debug.Assert((collectionInitializerExpression != null));
			Debug.Assert((collectionInitializerExpression.CreateExpressions != null));
			for (int i = 0; i < collectionInitializerExpression.CreateExpressions.Count; i++) {
				Expression o = collectionInitializerExpression.CreateExpressions[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (Expression)nodeStack.Pop();
				if (o == null)
					collectionInitializerExpression.CreateExpressions.RemoveAt(i--);
				else
					collectionInitializerExpression.CreateExpressions[i] = o;
			}
			return null;
		}
Пример #17
0
		IType CreateAnonymousClass (CollectionInitializerExpression initializer)
		{
			DomType result;
			if (!anonymousTypes.TryGetValue (initializer, out result)) {
				result = new AnonymousType ();
				result.SourceProjectDom = resolver.Dom;
				foreach (Expression expr in initializer.CreateExpressions) {
					var oldPos = resolver.ResolvePosition;
					if (!expr.StartLocation.IsEmpty)
						resolver.resolvePosition = new DomLocation (expr.StartLocation.Line + resolver.CallingMember.Location.Line, expr.StartLocation.Column);
					DomProperty newProperty = new DomProperty (GetAnonymousTypeFieldName (expr), MonoDevelop.Projects.Dom.Modifiers.Public, DomLocation.Empty, DomRegion.Empty, ResolveType (expr));
					newProperty.DeclaringType = result;
					result.Add (newProperty);
					resolver.resolvePosition = oldPos;
				}
				anonymousTypes[initializer] = result;
			}
			return result;
		}
Пример #18
0
 public virtual object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data) {
     throw CreateException(collectionInitializerExpression);
 }
Пример #19
0
	void CollectionInitializer(
#line  1468 "VBNET.ATG" 
out Expression outExpr) {

#line  1470 "VBNET.ATG" 
		Expression expr = null;
		CollectionInitializerExpression initializer = new CollectionInitializerExpression();
		
		Expect(22);
		if (StartOf(28)) {
			VariableInitializer(
#line  1475 "VBNET.ATG" 
out expr);

#line  1477 "VBNET.ATG" 
			if (expr != null) { initializer.CreateExpressions.Add(expr); }
			
			while (
#line  1480 "VBNET.ATG" 
NotFinalComma()) {
				Expect(12);
				VariableInitializer(
#line  1480 "VBNET.ATG" 
out expr);

#line  1481 "VBNET.ATG" 
				if (expr != null) { initializer.CreateExpressions.Add(expr); } 
			}
		}
		Expect(23);

#line  1484 "VBNET.ATG" 
		outExpr = initializer; 
	}
Пример #20
0
	void CollectionInitializer(
#line  1423 "Frames/cs.ATG" 
out Expression outExpr) {

#line  1425 "Frames/cs.ATG" 
		Expression expr = null;
		CollectionInitializerExpression initializer = new CollectionInitializerExpression();
		
		Expect(16);

#line  1429 "Frames/cs.ATG" 
		initializer.StartLocation = t.Location; 
		if (StartOf(31)) {
			VariableInitializer(
#line  1430 "Frames/cs.ATG" 
out expr);

#line  1431 "Frames/cs.ATG" 
			SafeAdd(initializer, initializer.CreateExpressions, expr); 
			while (
#line  1432 "Frames/cs.ATG" 
NotFinalComma()) {
				Expect(14);
				VariableInitializer(
#line  1433 "Frames/cs.ATG" 
out expr);

#line  1434 "Frames/cs.ATG" 
				SafeAdd(initializer, initializer.CreateExpressions, expr); 
			}
			if (la.kind == 14) {
				lexer.NextToken();
			}
		}
		Expect(17);

#line  1438 "Frames/cs.ATG" 
		initializer.EndLocation = t.Location; outExpr = initializer; 
	}
Пример #21
0
	void CollectionOrObjectInitializer(
#line  1465 "cs.ATG" 
out Expression outExpr) {

#line  1467 "cs.ATG" 
		Expression expr = null;
		CollectionInitializerExpression initializer = new CollectionInitializerExpression();
		
		Expect(16);

#line  1471 "cs.ATG" 
		initializer.StartLocation = t.Location; 
		if (StartOf(30)) {
			ObjectPropertyInitializerOrVariableInitializer(
#line  1472 "cs.ATG" 
out expr);

#line  1473 "cs.ATG" 
			SafeAdd(initializer, initializer.CreateExpressions, expr); 
			while (
#line  1474 "cs.ATG" 
NotFinalComma()) {
				Expect(14);
				ObjectPropertyInitializerOrVariableInitializer(
#line  1475 "cs.ATG" 
out expr);

#line  1476 "cs.ATG" 
				SafeAdd(initializer, initializer.CreateExpressions, expr); 
			}
			if (la.kind == 14) {
				lexer.NextToken();
			}
		}
		Expect(17);

#line  1480 "cs.ATG" 
		initializer.EndLocation = t.Location; outExpr = initializer; 
	}
Пример #22
0
	void CollectionOrObjectInitializer(
#line  1441 "Frames/cs.ATG" 
out Expression outExpr) {

#line  1443 "Frames/cs.ATG" 
		Expression expr = null;
		CollectionInitializerExpression initializer = new CollectionInitializerExpression();
		
		Expect(16);

#line  1447 "Frames/cs.ATG" 
		initializer.StartLocation = t.Location; 
		if (StartOf(31)) {
			ObjectPropertyInitializerOrVariableInitializer(
#line  1448 "Frames/cs.ATG" 
out expr);

#line  1449 "Frames/cs.ATG" 
			SafeAdd(initializer, initializer.CreateExpressions, expr); 
			while (
#line  1450 "Frames/cs.ATG" 
NotFinalComma()) {
				Expect(14);
				ObjectPropertyInitializerOrVariableInitializer(
#line  1451 "Frames/cs.ATG" 
out expr);

#line  1452 "Frames/cs.ATG" 
				SafeAdd(initializer, initializer.CreateExpressions, expr); 
			}
			if (la.kind == 14) {
				lexer.NextToken();
			}
		}
		Expect(17);

#line  1456 "Frames/cs.ATG" 
		initializer.EndLocation = t.Location; outExpr = initializer; 
	}
Пример #23
0
	void CollectionInitializer(
#line  1511 "VBNET.ATG" 
out Expression outExpr) {

#line  1513 "VBNET.ATG" 
		Expression expr = null;
		CollectionInitializerExpression initializer = new CollectionInitializerExpression();
		
		Expect(23);
		if (StartOf(30)) {
			VariableInitializer(
#line  1518 "VBNET.ATG" 
out expr);

#line  1520 "VBNET.ATG" 
			if (expr != null) { initializer.CreateExpressions.Add(expr); }
			
			while (
#line  1523 "VBNET.ATG" 
NotFinalComma()) {
				Expect(12);
				VariableInitializer(
#line  1523 "VBNET.ATG" 
out expr);

#line  1524 "VBNET.ATG" 
				if (expr != null) { initializer.CreateExpressions.Add(expr); } 
			}
		}
		Expect(24);

#line  1527 "VBNET.ATG" 
		outExpr = initializer; 
	}
Пример #24
0
		public override object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data)
		{
			// used for implicitly typed arrays
			if (collectionInitializerExpression.CreateExpressions.Count == 0)
				return null;
			IReturnType combinedRT = ResolveType(collectionInitializerExpression.CreateExpressions[0]);
			for (int i = 1; i < collectionInitializerExpression.CreateExpressions.Count; i++) {
				IReturnType rt = ResolveType(collectionInitializerExpression.CreateExpressions[i]);
				combinedRT = MemberLookupHelper.GetCommonType(resolver.ProjectContent, combinedRT, rt);
			}
			if (combinedRT == null)
				return null;
			return CreateResolveResult(new ArrayReturnType(resolver.ProjectContent, combinedRT, 1));
		}
		public sealed override object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data) {
			this.BeginVisit(collectionInitializerExpression);
			object result = this.TrackedVisitCollectionInitializerExpression(collectionInitializerExpression, data);
			this.EndVisit(collectionInitializerExpression);
			return result;
		}
Пример #26
0
		DefaultClass CreateAnonymousTypeClass(CollectionInitializerExpression initializer)
		{
			List<IReturnType> fieldTypes = new List<IReturnType>();
			List<string> fieldNames = new List<string>();
			
			foreach (Expression expr in initializer.CreateExpressions) {
				if (expr is NamedArgumentExpression) {
					// use right part only
					fieldTypes.Add( ResolveType(((NamedArgumentExpression)expr).Expression) );
				} else {
					fieldTypes.Add( ResolveType(expr) );
				}
				
				fieldNames.Add(GetAnonymousTypeFieldName(expr));
			}
			
			StringBuilder nameBuilder = new StringBuilder();
			nameBuilder.Append('{');
			for (int i = 0; i < fieldTypes.Count; i++) {
				if (i > 0) nameBuilder.Append(", ");
				nameBuilder.Append(fieldNames[i]);
				nameBuilder.Append(" : ");
				if (fieldTypes[i] != null) {
					nameBuilder.Append(fieldTypes[i].DotNetName);
				}
			}
			nameBuilder.Append('}');
			
			DefaultClass c = new DefaultClass(new DefaultCompilationUnit(resolver.ProjectContent), nameBuilder.ToString());
			c.Modifiers = ModifierEnum.Internal | ModifierEnum.Synthetic | ModifierEnum.Sealed;
			for (int i = 0; i < fieldTypes.Count; i++) {
				DefaultProperty p = new DefaultProperty(fieldNames[i], fieldTypes[i], ModifierEnum.Public | ModifierEnum.Synthetic, DomRegion.Empty, DomRegion.Empty, c);
				p.CanGet = true;
				p.CanSet = false;
				c.Properties.Add(p);
			}
			return c;
		}
 public override object TrackedVisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data)
 {
     return null;
 }
Пример #28
0
	void CollectionInitializer(
#line  1566 "VBNET.ATG" 
out CollectionInitializerExpression outExpr) {

#line  1568 "VBNET.ATG" 
		Expression expr = null;
		CollectionInitializerExpression initializer = new CollectionInitializerExpression();
		Location startLocation = la.Location;
		
		Expect(35);
		if (StartOf(25)) {
			Expr(
#line  1574 "VBNET.ATG" 
out expr);

#line  1576 "VBNET.ATG" 
			if (expr != null) { initializer.CreateExpressions.Add(expr); }
			
			while (
#line  1579 "VBNET.ATG" 
NotFinalComma()) {
				Expect(22);
				Expr(
#line  1579 "VBNET.ATG" 
out expr);

#line  1580 "VBNET.ATG" 
				if (expr != null) { initializer.CreateExpressions.Add(expr); } 
			}
		}
		Expect(36);

#line  1585 "VBNET.ATG" 
		outExpr = initializer;
		outExpr.StartLocation = startLocation;
		outExpr.EndLocation = t.EndLocation;
		
	}
Пример #29
0
	void CollectionInitializer(
//#line  1559 "VBNET.ATG" 
out CollectionInitializerExpression outExpr) {

//#line  1561 "VBNET.ATG" 
		Expression expr = null;
		CollectionInitializerExpression initializer = new CollectionInitializerExpression();
		Location startLocation = la.Location;
		
		Expect(35);
		if (StartOf(24)) {
			Expr(
//#line  1567 "VBNET.ATG" 
out expr);

//#line  1569 "VBNET.ATG" 
			if (expr != null) { initializer.CreateExpressions.Add(expr); }
			
			while (
//#line  1572 "VBNET.ATG" 
NotFinalComma()) {
				Expect(22);
				Expr(
//#line  1572 "VBNET.ATG" 
out expr);

//#line  1573 "VBNET.ATG" 
				if (expr != null) { initializer.CreateExpressions.Add(expr); } 
			}
		}
		Expect(36);

//#line  1578 "VBNET.ATG" 
		outExpr = initializer;
		outExpr.StartLocation = startLocation;
		outExpr.EndLocation = t.EndLocation;
		
	}
 private bool IsMatch(CollectionInitializerExpression left, CollectionInitializerExpression right)
 {
     return true;
 }