public virtual object VisitAttributeSection(AttributeSection attributeSection, object data) {
			Debug.Assert((attributeSection != null));
			Debug.Assert((attributeSection.Attributes != null));
			foreach (ICSharpCode.OldNRefactory.Ast.Attribute o in attributeSection.Attributes) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			return null;
		}
Esempio n. 2
0
	void GlobalAttributeSection() {
		Expect(18);

#line  213 "Frames/cs.ATG" 
		Location startPos = t.Location; 
		Identifier();

#line  214 "Frames/cs.ATG" 
		if (t.val != "assembly" && t.val != "module") Error("global attribute target specifier (assembly or module) expected");
		string attributeTarget = t.val;
		List<ASTAttribute> attributes = new List<ASTAttribute>();
		ASTAttribute attribute;
		
		Expect(9);
		Attribute(
#line  219 "Frames/cs.ATG" 
out attribute);

#line  219 "Frames/cs.ATG" 
		attributes.Add(attribute); 
		while (
#line  220 "Frames/cs.ATG" 
NotFinalComma()) {
			Expect(14);
			Attribute(
#line  220 "Frames/cs.ATG" 
out attribute);

#line  220 "Frames/cs.ATG" 
			attributes.Add(attribute); 
		}
		if (la.kind == 14) {
			lexer.NextToken();
		}
		Expect(19);

#line  222 "Frames/cs.ATG" 
		AttributeSection section = new AttributeSection {
		   AttributeTarget = attributeTarget,
		   Attributes = attributes,
		   StartLocation = startPos,
		   EndLocation = t.EndLocation
		};
		compilationUnit.AddChild(section);
		
	}
Esempio n. 3
0
	void AttributeSection(
#line  291 "Frames/cs.ATG" 
out AttributeSection section) {

#line  293 "Frames/cs.ATG" 
		string attributeTarget = "";
		List<ASTAttribute> attributes = new List<ASTAttribute>();
		ASTAttribute attribute;
		
		
		Expect(18);

#line  299 "Frames/cs.ATG" 
		Location startPos = t.Location; 
		if (
#line  300 "Frames/cs.ATG" 
IsLocalAttrTarget()) {
			if (la.kind == 69) {
				lexer.NextToken();

#line  301 "Frames/cs.ATG" 
				attributeTarget = "event";
			} else if (la.kind == 101) {
				lexer.NextToken();

#line  302 "Frames/cs.ATG" 
				attributeTarget = "return";
			} else {
				Identifier();

#line  303 "Frames/cs.ATG" 
				if (t.val != "field"   && t.val != "method" &&
				  t.val != "param" &&
				  t.val != "property" && t.val != "type")
				Error("attribute target specifier (field, event, method, param, property, return or type) expected");
				attributeTarget = t.val;
				
			}
			Expect(9);
		}
		Attribute(
#line  312 "Frames/cs.ATG" 
out attribute);

#line  312 "Frames/cs.ATG" 
		attributes.Add(attribute); 
		while (
#line  313 "Frames/cs.ATG" 
NotFinalComma()) {
			Expect(14);
			Attribute(
#line  313 "Frames/cs.ATG" 
out attribute);

#line  313 "Frames/cs.ATG" 
			attributes.Add(attribute); 
		}
		if (la.kind == 14) {
			lexer.NextToken();
		}
		Expect(19);

#line  315 "Frames/cs.ATG" 
		section = new AttributeSection {
		   AttributeTarget = attributeTarget,
		   Attributes = attributes,
		   StartLocation = startPos,
		   EndLocation = t.EndLocation
		};
		
	}
		public sealed override object VisitAttributeSection(AttributeSection attributeSection, object data) {
			this.BeginVisit(attributeSection);
			object result = this.TrackedVisitAttributeSection(attributeSection, data);
			this.EndVisit(attributeSection);
			return result;
		}
		public virtual object TrackedVisitAttributeSection(AttributeSection attributeSection, object data) {
			return base.VisitAttributeSection(attributeSection, data);
		}
Esempio n. 6
0
	void AttributeSection(
#line  2596 "VBNET.ATG" 
out AttributeSection section) {

#line  2598 "VBNET.ATG" 
		string attributeTarget = "";List<ASTAttribute> attributes = new List<ASTAttribute>();
		ASTAttribute attribute;
		
		
		Expect(28);

#line  2602 "VBNET.ATG" 
		Location startPos = t.Location; 
		if (
#line  2603 "VBNET.ATG" 
IsLocalAttrTarget()) {
			if (la.kind == 106) {
				lexer.NextToken();

#line  2604 "VBNET.ATG" 
				attributeTarget = "event";
			} else if (la.kind == 180) {
				lexer.NextToken();

#line  2605 "VBNET.ATG" 
				attributeTarget = "return";
			} else {
				Identifier();

#line  2608 "VBNET.ATG" 
				string val = t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture);
				if (val != "field"	|| val != "method" ||
					val != "module" || val != "param"  ||
					val != "property" || val != "type")
				Error("attribute target specifier (event, return, field," +
						"method, module, param, property, or type) expected");
				attributeTarget = t.val;
				
			}
			Expect(11);
		}
		Attribute(
#line  2618 "VBNET.ATG" 
out attribute);

#line  2618 "VBNET.ATG" 
		attributes.Add(attribute); 
		while (
#line  2619 "VBNET.ATG" 
NotFinalComma()) {
			Expect(12);
			Attribute(
#line  2619 "VBNET.ATG" 
out attribute);

#line  2619 "VBNET.ATG" 
			attributes.Add(attribute); 
		}
		if (la.kind == 12) {
			lexer.NextToken();
		}
		Expect(27);

#line  2623 "VBNET.ATG" 
		section = new AttributeSection {
		AttributeTarget = attributeTarget,
		Attributes = attributes,
		StartLocation = startPos,
		EndLocation = t.EndLocation
		};
		
	}
Esempio n. 7
0
	void GlobalAttributeSection() {
		Expect(28);

#line  2521 "VBNET.ATG" 
		Location startPos = t.Location; 
		if (la.kind == 52) {
			lexer.NextToken();
		} else if (la.kind == 141) {
			lexer.NextToken();
		} else SynErr(226);

#line  2523 "VBNET.ATG" 
		string attributeTarget = t.val != null ? t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture) : null;
		List<ASTAttribute> attributes = new List<ASTAttribute>();
		ASTAttribute attribute;
		
		Expect(11);
		Attribute(
#line  2527 "VBNET.ATG" 
out attribute);

#line  2527 "VBNET.ATG" 
		attributes.Add(attribute); 
		while (
#line  2528 "VBNET.ATG" 
NotFinalComma()) {
			if (la.kind == 12) {
				lexer.NextToken();
				if (la.kind == 52) {
					lexer.NextToken();
				} else if (la.kind == 141) {
					lexer.NextToken();
				} else SynErr(227);
				Expect(11);
			}
			Attribute(
#line  2528 "VBNET.ATG" 
out attribute);

#line  2528 "VBNET.ATG" 
			attributes.Add(attribute); 
		}
		if (la.kind == 12) {
			lexer.NextToken();
		}
		Expect(27);
		EndOfStmt();

#line  2533 "VBNET.ATG" 
		AttributeSection section = new AttributeSection {
		AttributeTarget = attributeTarget,
		Attributes = attributes,
		StartLocation = startPos,
		EndLocation = t.EndLocation
		};
		compilationUnit.AddChild(section);
		
	}
		public virtual object VisitAttributeSection(AttributeSection attributeSection, object data) {
			Debug.Assert((attributeSection != null));
			Debug.Assert((attributeSection.Attributes != null));
			for (int i = 0; i < attributeSection.Attributes.Count; i++) {
				ICSharpCode.OldNRefactory.Ast.Attribute o = attributeSection.Attributes[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (ICSharpCode.OldNRefactory.Ast.Attribute)nodeStack.Pop();
				if (o == null)
					attributeSection.Attributes.RemoveAt(i--);
				else
					attributeSection.Attributes[i] = o;
			}
			return null;
		}
		public virtual object VisitAttributeSection(AttributeSection attributeSection, object data) {
			throw new global::System.NotImplementedException("AttributeSection");
		}
		public override object VisitAttributeSection(AttributeSection attributeSection, object data)
		{
			return null;
		}