public sealed override object VisitTemplateDefinition(TemplateDefinition templateDefinition, object data) {
			this.BeginVisit(templateDefinition);
			object result = this.TrackedVisitTemplateDefinition(templateDefinition, data);
			this.EndVisit(templateDefinition);
			return result;
		}
		public virtual object VisitTemplateDefinition(TemplateDefinition templateDefinition, object data) {
			Debug.Assert((templateDefinition != null));
			Debug.Assert((templateDefinition.Attributes != null));
			Debug.Assert((templateDefinition.Bases != null));
			foreach (AttributeSection o in templateDefinition.Attributes) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			foreach (TypeReference o in templateDefinition.Bases) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			return null;
		}
		public virtual object TrackedVisitTemplateDefinition(TemplateDefinition templateDefinition, object data) {
			return base.VisitTemplateDefinition(templateDefinition, data);
		}
Esempio n. 4
0
	void TypeParameterConstraints(
#line  397 "VBNET.ATG" 
TemplateDefinition template) {

#line  399 "VBNET.ATG" 
		TypeReference constraint;
		
		Expect(50);
		if (la.kind == 23) {
			lexer.NextToken();
			TypeParameterConstraint(
#line  405 "VBNET.ATG" 
out constraint);

#line  405 "VBNET.ATG" 
			if (constraint != null) { template.Bases.Add(constraint); } 
			while (la.kind == 12) {
				lexer.NextToken();
				TypeParameterConstraint(
#line  408 "VBNET.ATG" 
out constraint);

#line  408 "VBNET.ATG" 
				if (constraint != null) { template.Bases.Add(constraint); } 
			}
			Expect(24);
		} else if (StartOf(6)) {
			TypeParameterConstraint(
#line  411 "VBNET.ATG" 
out constraint);

#line  411 "VBNET.ATG" 
			if (constraint != null) { template.Bases.Add(constraint); } 
		} else SynErr(234);
	}
Esempio n. 5
0
	void TypeParameter(
#line  390 "VBNET.ATG" 
out TemplateDefinition template) {
		Identifier();

#line  392 "VBNET.ATG" 
		template = new TemplateDefinition(t.val, null); 
		if (la.kind == 50) {
			TypeParameterConstraints(
#line  393 "VBNET.ATG" 
template);
		}
	}
		public virtual object VisitTemplateDefinition(TemplateDefinition templateDefinition, object data) {
			Debug.Assert((templateDefinition != null));
			Debug.Assert((templateDefinition.Attributes != null));
			Debug.Assert((templateDefinition.Bases != null));
			for (int i = 0; i < templateDefinition.Attributes.Count; i++) {
				AttributeSection o = templateDefinition.Attributes[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (AttributeSection)nodeStack.Pop();
				if (o == null)
					templateDefinition.Attributes.RemoveAt(i--);
				else
					templateDefinition.Attributes[i] = o;
			}
			for (int i = 0; i < templateDefinition.Bases.Count; i++) {
				TypeReference o = templateDefinition.Bases[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (TypeReference)nodeStack.Pop();
				if (o == null)
					templateDefinition.Bases.RemoveAt(i--);
				else
					templateDefinition.Bases[i] = o;
			}
			return null;
		}
		public virtual object VisitTemplateDefinition(TemplateDefinition templateDefinition, object data) {
			throw new global::System.NotImplementedException("TemplateDefinition");
		}