public sealed override object VisitEventRaiseRegion(EventRaiseRegion eventRaiseRegion, object data) {
			this.BeginVisit(eventRaiseRegion);
			object result = this.TrackedVisitEventRaiseRegion(eventRaiseRegion, data);
			this.EndVisit(eventRaiseRegion);
			return result;
		}
		public virtual object VisitEventRaiseRegion(EventRaiseRegion eventRaiseRegion, object data) {
			Debug.Assert((eventRaiseRegion != null));
			Debug.Assert((eventRaiseRegion.Attributes != null));
			Debug.Assert((eventRaiseRegion.Block != null));
			Debug.Assert((eventRaiseRegion.Parameters != null));
			foreach (AttributeSection o in eventRaiseRegion.Attributes) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			eventRaiseRegion.Block.AcceptVisitor(this, data);
			foreach (ParameterDeclarationExpression o in eventRaiseRegion.Parameters) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			return null;
		}
		public virtual object TrackedVisitEventRaiseRegion(EventRaiseRegion eventRaiseRegion, object data) {
			return base.VisitEventRaiseRegion(eventRaiseRegion, data);
		}
Beispiel #4
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 VisitEventRaiseRegion(EventRaiseRegion eventRaiseRegion, object data) {
			Debug.Assert((eventRaiseRegion != null));
			Debug.Assert((eventRaiseRegion.Attributes != null));
			Debug.Assert((eventRaiseRegion.Block != null));
			Debug.Assert((eventRaiseRegion.Parameters != null));
			for (int i = 0; i < eventRaiseRegion.Attributes.Count; i++) {
				AttributeSection o = eventRaiseRegion.Attributes[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (AttributeSection)nodeStack.Pop();
				if (o == null)
					eventRaiseRegion.Attributes.RemoveAt(i--);
				else
					eventRaiseRegion.Attributes[i] = o;
			}
			nodeStack.Push(eventRaiseRegion.Block);
			eventRaiseRegion.Block.AcceptVisitor(this, data);
			eventRaiseRegion.Block = ((BlockStatement)(nodeStack.Pop()));
			for (int i = 0; i < eventRaiseRegion.Parameters.Count; i++) {
				ParameterDeclarationExpression o = eventRaiseRegion.Parameters[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (ParameterDeclarationExpression)nodeStack.Pop();
				if (o == null)
					eventRaiseRegion.Parameters.RemoveAt(i--);
				else
					eventRaiseRegion.Parameters[i] = o;
			}
			return null;
		}
		public virtual object VisitEventRaiseRegion(EventRaiseRegion eventRaiseRegion, object data) {
			throw new global::System.NotImplementedException("EventRaiseRegion");
		}
Beispiel #7
0
		public EventDeclaration() {
			addRegion = EventAddRegion.Null;
			removeRegion = EventRemoveRegion.Null;
			raiseRegion = EventRaiseRegion.Null;
			bodyStart = Location.Empty;
			bodyEnd = Location.Empty;
			initializer = Expression.Null;
		}