public virtual object VisitEventAddRegion(EventAddRegion eventAddRegion, object data) {
			Debug.Assert((eventAddRegion != null));
			Debug.Assert((eventAddRegion.Attributes != null));
			Debug.Assert((eventAddRegion.Block != null));
			Debug.Assert((eventAddRegion.Parameters != null));
			foreach (AttributeSection o in eventAddRegion.Attributes) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			eventAddRegion.Block.AcceptVisitor(this, data);
			foreach (ParameterDeclarationExpression o in eventAddRegion.Parameters) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			return null;
		}
		public sealed override object VisitEventAddRegion(EventAddRegion eventAddRegion, object data) {
			this.BeginVisit(eventAddRegion);
			object result = this.TrackedVisitEventAddRegion(eventAddRegion, data);
			this.EndVisit(eventAddRegion);
			return result;
		}
Example #3
0
	void EventAccessorDecls(
#line  1246 "Frames/cs.ATG" 
out EventAddRegion addBlock, out EventRemoveRegion removeBlock) {

#line  1247 "Frames/cs.ATG" 
		AttributeSection section;
		List<AttributeSection> attributes = new List<AttributeSection>();
		Statement stmt;
		addBlock = null;
		removeBlock = null;
		
		while (la.kind == 18) {
			AttributeSection(
#line  1254 "Frames/cs.ATG" 
out section);

#line  1254 "Frames/cs.ATG" 
			attributes.Add(section); 
		}
		if (la.kind == 130) {

#line  1256 "Frames/cs.ATG" 
			addBlock = new EventAddRegion(attributes); 
			AddAccessorDecl(
#line  1257 "Frames/cs.ATG" 
out stmt);

#line  1257 "Frames/cs.ATG" 
			attributes = new List<AttributeSection>(); addBlock.Block = (BlockStatement)stmt; 
			while (la.kind == 18) {
				AttributeSection(
#line  1258 "Frames/cs.ATG" 
out section);

#line  1258 "Frames/cs.ATG" 
				attributes.Add(section); 
			}
			RemoveAccessorDecl(
#line  1259 "Frames/cs.ATG" 
out stmt);

#line  1259 "Frames/cs.ATG" 
			removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; 
		} else if (la.kind == 131) {
			RemoveAccessorDecl(
#line  1261 "Frames/cs.ATG" 
out stmt);

#line  1261 "Frames/cs.ATG" 
			removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; attributes = new List<AttributeSection>(); 
			while (la.kind == 18) {
				AttributeSection(
#line  1262 "Frames/cs.ATG" 
out section);

#line  1262 "Frames/cs.ATG" 
				attributes.Add(section); 
			}
			AddAccessorDecl(
#line  1263 "Frames/cs.ATG" 
out stmt);

#line  1263 "Frames/cs.ATG" 
			addBlock = new EventAddRegion(attributes); addBlock.Block = (BlockStatement)stmt; 
		} else SynErr(183);
	}
		public virtual object TrackedVisitEventAddRegion(EventAddRegion eventAddRegion, object data) {
			return base.VisitEventAddRegion(eventAddRegion, data);
		}
Example #5
0
	void EventAccessorDeclaration(
#line  1278 "VBNET.ATG" 
out EventAddRemoveRegion eventAccessorDeclaration) {

#line  1280 "VBNET.ATG" 
		Statement stmt = null;
		List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
		AttributeSection section;
		List<AttributeSection> attributes = new List<AttributeSection>();
		eventAccessorDeclaration = null;
		
		while (la.kind == 28) {
			AttributeSection(
#line  1286 "VBNET.ATG" 
out section);

#line  1286 "VBNET.ATG" 
			attributes.Add(section); 
		}
		if (la.kind == 43) {
			lexer.NextToken();
			if (la.kind == 25) {
				lexer.NextToken();
				if (StartOf(4)) {
					FormalParameterList(
#line  1288 "VBNET.ATG" 
p);
				}
				Expect(26);
			}
			Expect(1);
			Block(
#line  1289 "VBNET.ATG" 
out stmt);
			Expect(100);
			Expect(43);
			EndOfStmt();

#line  1291 "VBNET.ATG" 
			eventAccessorDeclaration = new EventAddRegion(attributes);
			eventAccessorDeclaration.Block = (BlockStatement)stmt;
			eventAccessorDeclaration.Parameters = p;
			
		} else if (la.kind == 178) {
			lexer.NextToken();
			if (la.kind == 25) {
				lexer.NextToken();
				if (StartOf(4)) {
					FormalParameterList(
#line  1296 "VBNET.ATG" 
p);
				}
				Expect(26);
			}
			Expect(1);
			Block(
#line  1297 "VBNET.ATG" 
out stmt);
			Expect(100);
			Expect(178);
			EndOfStmt();

#line  1299 "VBNET.ATG" 
			eventAccessorDeclaration = new EventRemoveRegion(attributes);
			eventAccessorDeclaration.Block = (BlockStatement)stmt;
			eventAccessorDeclaration.Parameters = p;
			
		} else if (la.kind == 174) {
			lexer.NextToken();
			if (la.kind == 25) {
				lexer.NextToken();
				if (StartOf(4)) {
					FormalParameterList(
#line  1304 "VBNET.ATG" 
p);
				}
				Expect(26);
			}
			Expect(1);
			Block(
#line  1305 "VBNET.ATG" 
out stmt);
			Expect(100);
			Expect(174);
			EndOfStmt();

#line  1307 "VBNET.ATG" 
			eventAccessorDeclaration = new EventRaiseRegion(attributes);
			eventAccessorDeclaration.Block = (BlockStatement)stmt;
			eventAccessorDeclaration.Parameters = p;
			
		} else SynErr(252);
	}
		public virtual object VisitEventAddRegion(EventAddRegion eventAddRegion, object data) {
			Debug.Assert((eventAddRegion != null));
			Debug.Assert((eventAddRegion.Attributes != null));
			Debug.Assert((eventAddRegion.Block != null));
			Debug.Assert((eventAddRegion.Parameters != null));
			for (int i = 0; i < eventAddRegion.Attributes.Count; i++) {
				AttributeSection o = eventAddRegion.Attributes[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (AttributeSection)nodeStack.Pop();
				if (o == null)
					eventAddRegion.Attributes.RemoveAt(i--);
				else
					eventAddRegion.Attributes[i] = o;
			}
			nodeStack.Push(eventAddRegion.Block);
			eventAddRegion.Block.AcceptVisitor(this, data);
			eventAddRegion.Block = ((BlockStatement)(nodeStack.Pop()));
			for (int i = 0; i < eventAddRegion.Parameters.Count; i++) {
				ParameterDeclarationExpression o = eventAddRegion.Parameters[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (ParameterDeclarationExpression)nodeStack.Pop();
				if (o == null)
					eventAddRegion.Parameters.RemoveAt(i--);
				else
					eventAddRegion.Parameters[i] = o;
			}
			return null;
		}
		public virtual object VisitEventAddRegion(EventAddRegion eventAddRegion, object data) {
			throw new global::System.NotImplementedException("EventAddRegion");
		}
Example #8
0
		public EventDeclaration() {
			addRegion = EventAddRegion.Null;
			removeRegion = EventRemoveRegion.Null;
			raiseRegion = EventRaiseRegion.Null;
			bodyStart = Location.Empty;
			bodyEnd = Location.Empty;
			initializer = Expression.Null;
		}