public virtual object VisitMemberInitializerExpression(MemberInitializerExpression memberInitializerExpression, object data) {
			throw new global::System.NotImplementedException("MemberInitializerExpression");
		}
Beispiel #2
0
	void MemberInitializer(
//#line  2620 "VBNET.ATG" 
out MemberInitializerExpression memberInitializer) {

//#line  2622 "VBNET.ATG" 
		memberInitializer = new MemberInitializerExpression();
		memberInitializer.StartLocation = la.Location;
		Expression initExpr = null;
		bool isKey = false;
		string name = null;
		
		if (la.kind == 147) {
			lexer.NextToken();

//#line  2628 "VBNET.ATG" 
			isKey = true; 
		}
		Expect(26);
		IdentifierOrKeyword(
//#line  2629 "VBNET.ATG" 
out name);
		Expect(20);
		Expr(
//#line  2629 "VBNET.ATG" 
out initExpr);

//#line  2631 "VBNET.ATG" 
		memberInitializer.Name = name;
		memberInitializer.Expression = initExpr;
		memberInitializer.IsKey = isKey;
		memberInitializer.EndLocation = t.EndLocation;
		
	}
		public override object TrackedVisitMemberInitializerExpression(MemberInitializerExpression memberInitializerExpression, object data)
		{
			Append(memberInitializerExpression.Name);
			Append(" = ");
			memberInitializerExpression.Expression.AcceptVisitor(this, data);
			return null;
		}
Beispiel #4
0
	void ObjectPropertyInitializerOrVariableInitializer(
#line  1483 "cs.ATG" 
out Expression expr) {

#line  1484 "cs.ATG" 
		expr = null; 
		if (
#line  1486 "cs.ATG" 
IdentAndAsgn()) {
			Identifier();

#line  1488 "cs.ATG" 
			MemberInitializerExpression mie = new MemberInitializerExpression(t.val, null);
			mie.StartLocation = t.Location;
			mie.IsKey = true;
			Expression r = null; 
			Expect(3);
			if (la.kind == 16) {
				CollectionOrObjectInitializer(
#line  1493 "cs.ATG" 
out r);
			} else if (StartOf(30)) {
				VariableInitializer(
#line  1494 "cs.ATG" 
out r);
			} else SynErr(196);

#line  1495 "cs.ATG" 
			mie.Expression = r; mie.EndLocation = t.EndLocation; expr = mie; 
		} else if (StartOf(30)) {
			VariableInitializer(
#line  1497 "cs.ATG" 
out expr);
		} else SynErr(197);
	}
		public sealed override object VisitMemberInitializerExpression(MemberInitializerExpression memberInitializerExpression, object data) {
			this.BeginVisit(memberInitializerExpression);
			object result = this.TrackedVisitMemberInitializerExpression(memberInitializerExpression, data);
			this.EndVisit(memberInitializerExpression);
			return result;
		}
		public virtual object TrackedVisitMemberInitializerExpression(MemberInitializerExpression memberInitializerExpression, object data) {
			return base.VisitMemberInitializerExpression(memberInitializerExpression, data);
		}
		public object VisitMemberInitializerExpression(MemberInitializerExpression memberInitializerExpression, object data)
		{
			throw new NotImplementedException();
		}
		public virtual object VisitMemberInitializerExpression(MemberInitializerExpression memberInitializerExpression, object data) {
			Debug.Assert((memberInitializerExpression != null));
			Debug.Assert((memberInitializerExpression.Expression != null));
			nodeStack.Push(memberInitializerExpression.Expression);
			memberInitializerExpression.Expression.AcceptVisitor(this, data);
			memberInitializerExpression.Expression = ((Expression)(nodeStack.Pop()));
			return null;
		}
		public virtual object VisitMemberInitializerExpression(MemberInitializerExpression memberInitializerExpression, object data) {
			Debug.Assert((memberInitializerExpression != null));
			Debug.Assert((memberInitializerExpression.Expression != null));
			return memberInitializerExpression.Expression.AcceptVisitor(this, data);
		}