public virtual object VisitXmlElementExpression(XmlElementExpression xmlElementExpression, object data) {
			Debug.Assert((xmlElementExpression != null));
			Debug.Assert((xmlElementExpression.Content != null));
			Debug.Assert((xmlElementExpression.NameExpression != null));
			Debug.Assert((xmlElementExpression.Attributes != null));
			xmlElementExpression.Content.AcceptVisitor(this, data);
			xmlElementExpression.NameExpression.AcceptVisitor(this, data);
			foreach (XmlExpression o in xmlElementExpression.Attributes) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			return xmlElementExpression.AcceptChildren(this, data);
		}
		public virtual object VisitXmlElementExpression(XmlElementExpression xmlElementExpression, object data) {
			throw new global::System.NotImplementedException("XmlElementExpression");
		}
		public virtual object VisitXmlElementExpression(XmlElementExpression xmlElementExpression, object data) {
			Debug.Assert((xmlElementExpression != null));
			Debug.Assert((xmlElementExpression.Content != null));
			Debug.Assert((xmlElementExpression.NameExpression != null));
			Debug.Assert((xmlElementExpression.Attributes != null));
			nodeStack.Push(xmlElementExpression.Content);
			xmlElementExpression.Content.AcceptVisitor(this, data);
			xmlElementExpression.Content = ((Expression)(nodeStack.Pop()));
			nodeStack.Push(xmlElementExpression.NameExpression);
			xmlElementExpression.NameExpression.AcceptVisitor(this, data);
			xmlElementExpression.NameExpression = ((Expression)(nodeStack.Pop()));
			for (int i = 0; i < xmlElementExpression.Attributes.Count; i++) {
				XmlExpression o = xmlElementExpression.Attributes[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (XmlExpression)nodeStack.Pop();
				if (o == null)
					xmlElementExpression.Attributes.RemoveAt(i--);
				else
					xmlElementExpression.Attributes[i] = o;
			}
			for (int i = 0; i < xmlElementExpression.Children.Count; i++) {
				INode o = xmlElementExpression.Children[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = nodeStack.Pop();
				if (o == null)
					xmlElementExpression.Children.RemoveAt(i--);
				else
					xmlElementExpression.Children[i] = o;
			}
			return null;
		}
Example #4
0
	void XmlElement(out XmlExpression expr) {
		XmlElementExpression el = new XmlElementExpression();
		Expect(10);
		el.StartLocation = t.Location;
		if (la.kind == 12) {
			Get();
			Expression innerExpression;
			Expr(out innerExpression);
			Expect(13);
			el.NameExpression = new XmlEmbeddedExpression() { InlineVBExpression = innerExpression };
		} else if (StartOf(5)) {
			Identifier();
			el.XmlName = t.val;
		} else SynErr(287);
		while (StartOf(37)) {
			XmlAttribute(el.Attributes);
		}
		if (la.kind == 14) {
			Get();
			el.EndLocation = t.EndLocation;
		} else if (la.kind == 11) {
			Get();
			while (StartOf(38)) {
				XmlExpression child;
				XmlNestedContent(out child);
				el.Children.Add(child);
			}
			Expect(15);
			while (StartOf(39)) {
				Get();
			}
			Expect(11);
			el.EndLocation = t.EndLocation;
		} else SynErr(288);
		expr = el;
	}
		public sealed override object VisitXmlElementExpression(XmlElementExpression xmlElementExpression, object data) {
			this.BeginVisit(xmlElementExpression);
			object result = this.TrackedVisitXmlElementExpression(xmlElementExpression, data);
			this.EndVisit(xmlElementExpression);
			return result;
		}
		public virtual object TrackedVisitXmlElementExpression(XmlElementExpression xmlElementExpression, object data) {
			return base.VisitXmlElementExpression(xmlElementExpression, data);
		}