public virtual object VisitPropertySetRegion(PropertySetRegion propertySetRegion, object data) {
			Debug.Assert((propertySetRegion != null));
			Debug.Assert((propertySetRegion.Attributes != null));
			Debug.Assert((propertySetRegion.Block != null));
			Debug.Assert((propertySetRegion.Parameters != null));
			foreach (AttributeSection o in propertySetRegion.Attributes) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			propertySetRegion.Block.AcceptVisitor(this, data);
			foreach (ParameterDeclarationExpression o in propertySetRegion.Parameters) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			return null;
		}
Example #2
0
	void InterfaceAccessors(
#line  1267 "Frames/cs.ATG" 
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {

#line  1269 "Frames/cs.ATG" 
		AttributeSection section;
		List<AttributeSection> attributes = new List<AttributeSection>();
		getBlock = null; setBlock = null;
		PropertyGetSetRegion lastBlock = null;
		
		while (la.kind == 18) {
			AttributeSection(
#line  1275 "Frames/cs.ATG" 
out section);

#line  1275 "Frames/cs.ATG" 
			attributes.Add(section); 
		}

#line  1276 "Frames/cs.ATG" 
		Location startLocation = la.Location; 
		if (la.kind == 128) {
			lexer.NextToken();

#line  1278 "Frames/cs.ATG" 
			getBlock = new PropertyGetRegion(null, attributes); 
		} else if (la.kind == 129) {
			lexer.NextToken();

#line  1279 "Frames/cs.ATG" 
			setBlock = new PropertySetRegion(null, attributes); 
		} else SynErr(187);
		Expect(11);

#line  1282 "Frames/cs.ATG" 
		if (getBlock != null) { getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation; }
		if (setBlock != null) { setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; }
		attributes = new List<AttributeSection>(); 
		if (la.kind == 18 || la.kind == 128 || la.kind == 129) {
			while (la.kind == 18) {
				AttributeSection(
#line  1286 "Frames/cs.ATG" 
out section);

#line  1286 "Frames/cs.ATG" 
				attributes.Add(section); 
			}

#line  1287 "Frames/cs.ATG" 
			startLocation = la.Location; 
			if (la.kind == 128) {
				lexer.NextToken();

#line  1289 "Frames/cs.ATG" 
				if (getBlock != null) Error("get already declared");
				                 else { getBlock = new PropertyGetRegion(null, attributes); lastBlock = getBlock; }
				              
			} else if (la.kind == 129) {
				lexer.NextToken();

#line  1292 "Frames/cs.ATG" 
				if (setBlock != null) Error("set already declared");
				                 else { setBlock = new PropertySetRegion(null, attributes); lastBlock = setBlock; }
				              
			} else SynErr(188);
			Expect(11);

#line  1297 "Frames/cs.ATG" 
			if (lastBlock != null) { lastBlock.StartLocation = startLocation; lastBlock.EndLocation = t.EndLocation; } 
		}
	}
Example #3
0
	void SetAccessorDecl(
#line  1236 "Frames/cs.ATG" 
out PropertySetRegion setBlock, List<AttributeSection> attributes) {

#line  1237 "Frames/cs.ATG" 
		Statement stmt = null; 
		Expect(129);

#line  1240 "Frames/cs.ATG" 
		Location startLocation = t.Location; 
		if (la.kind == 16) {
			Block(
#line  1241 "Frames/cs.ATG" 
out stmt);
		} else if (la.kind == 11) {
			lexer.NextToken();
		} else SynErr(190);

#line  1242 "Frames/cs.ATG" 
		setBlock = new PropertySetRegion((BlockStatement)stmt, attributes); 

#line  1243 "Frames/cs.ATG" 
		setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; 
	}
		public sealed override object VisitPropertySetRegion(PropertySetRegion propertySetRegion, object data) {
			this.BeginVisit(propertySetRegion);
			object result = this.TrackedVisitPropertySetRegion(propertySetRegion, data);
			this.EndVisit(propertySetRegion);
			return result;
		}
Example #5
0
	void AccessorDecls(
#line  1193 "Frames/cs.ATG" 
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {

#line  1195 "Frames/cs.ATG" 
		List<AttributeSection> attributes = new List<AttributeSection>(); 
		AttributeSection section;
		getBlock = null;
		setBlock = null; 
		ModifierList modifiers = null;
		
		while (la.kind == 18) {
			AttributeSection(
#line  1202 "Frames/cs.ATG" 
out section);

#line  1202 "Frames/cs.ATG" 
			attributes.Add(section); 
		}
		if (la.kind == 84 || la.kind == 96 || la.kind == 97) {
			AccessorModifiers(
#line  1203 "Frames/cs.ATG" 
out modifiers);
		}
		if (la.kind == 128) {
			GetAccessorDecl(
#line  1205 "Frames/cs.ATG" 
out getBlock, attributes);

#line  1206 "Frames/cs.ATG" 
			if (modifiers != null) {getBlock.Modifier = modifiers.Modifier; } 
			if (StartOf(27)) {

#line  1207 "Frames/cs.ATG" 
				attributes = new List<AttributeSection>(); modifiers = null; 
				while (la.kind == 18) {
					AttributeSection(
#line  1208 "Frames/cs.ATG" 
out section);

#line  1208 "Frames/cs.ATG" 
					attributes.Add(section); 
				}
				if (la.kind == 84 || la.kind == 96 || la.kind == 97) {
					AccessorModifiers(
#line  1209 "Frames/cs.ATG" 
out modifiers);
				}
				SetAccessorDecl(
#line  1210 "Frames/cs.ATG" 
out setBlock, attributes);

#line  1211 "Frames/cs.ATG" 
				if (modifiers != null) {setBlock.Modifier = modifiers.Modifier; } 
			}
		} else if (la.kind == 129) {
			SetAccessorDecl(
#line  1214 "Frames/cs.ATG" 
out setBlock, attributes);

#line  1215 "Frames/cs.ATG" 
			if (modifiers != null) {setBlock.Modifier = modifiers.Modifier; } 
			if (StartOf(28)) {

#line  1216 "Frames/cs.ATG" 
				attributes = new List<AttributeSection>(); modifiers = null; 
				while (la.kind == 18) {
					AttributeSection(
#line  1217 "Frames/cs.ATG" 
out section);

#line  1217 "Frames/cs.ATG" 
					attributes.Add(section); 
				}
				if (la.kind == 84 || la.kind == 96 || la.kind == 97) {
					AccessorModifiers(
#line  1218 "Frames/cs.ATG" 
out modifiers);
				}
				GetAccessorDecl(
#line  1219 "Frames/cs.ATG" 
out getBlock, attributes);

#line  1220 "Frames/cs.ATG" 
				if (modifiers != null) {getBlock.Modifier = modifiers.Modifier; } 
			}
		} else if (StartOf(19)) {
			Identifier();

#line  1222 "Frames/cs.ATG" 
			Error("get or set accessor declaration expected"); 
		} else SynErr(186);
	}
Example #6
0
	void SetAccessorDecl(
#line  1357 "VBNET.ATG" 
out PropertySetRegion setBlock, List<AttributeSection> attributes) {

#line  1359 "VBNET.ATG" 
		Statement stmt = null;
		List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
		Modifiers m;
		
		PropertyAccessorAccessModifier(
#line  1364 "VBNET.ATG" 
out m);
		Expect(183);

#line  1366 "VBNET.ATG" 
		Location startLocation = t.Location; 
		if (la.kind == 25) {
			lexer.NextToken();
			if (StartOf(4)) {
				FormalParameterList(
#line  1367 "VBNET.ATG" 
p);
			}
			Expect(26);
		}
		Expect(1);
		Block(
#line  1369 "VBNET.ATG" 
out stmt);

#line  1371 "VBNET.ATG" 
		setBlock = new PropertySetRegion((BlockStatement)stmt, attributes);
		setBlock.Modifier = m;
		setBlock.Parameters = p;
		
		Expect(100);
		Expect(183);

#line  1376 "VBNET.ATG" 
		setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; 
		EndOfStmt();
	}
		public virtual object TrackedVisitPropertySetRegion(PropertySetRegion propertySetRegion, object data) {
			return base.VisitPropertySetRegion(propertySetRegion, data);
		}
Example #8
0
	void AccessorDecls(
#line  1315 "VBNET.ATG" 
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {

#line  1317 "VBNET.ATG" 
		List<AttributeSection> attributes = new List<AttributeSection>();
		AttributeSection section;
		getBlock = null;
		setBlock = null; 
		
		while (la.kind == 28) {
			AttributeSection(
#line  1322 "VBNET.ATG" 
out section);

#line  1322 "VBNET.ATG" 
			attributes.Add(section); 
		}
		if (StartOf(24)) {
			GetAccessorDecl(
#line  1324 "VBNET.ATG" 
out getBlock, attributes);
			if (StartOf(25)) {

#line  1326 "VBNET.ATG" 
				attributes = new List<AttributeSection>(); 
				while (la.kind == 28) {
					AttributeSection(
#line  1327 "VBNET.ATG" 
out section);

#line  1327 "VBNET.ATG" 
					attributes.Add(section); 
				}
				SetAccessorDecl(
#line  1328 "VBNET.ATG" 
out setBlock, attributes);
			}
		} else if (StartOf(26)) {
			SetAccessorDecl(
#line  1331 "VBNET.ATG" 
out setBlock, attributes);
			if (StartOf(27)) {

#line  1333 "VBNET.ATG" 
				attributes = new List<AttributeSection>(); 
				while (la.kind == 28) {
					AttributeSection(
#line  1334 "VBNET.ATG" 
out section);

#line  1334 "VBNET.ATG" 
					attributes.Add(section); 
				}
				GetAccessorDecl(
#line  1335 "VBNET.ATG" 
out getBlock, attributes);
			}
		} else SynErr(251);
	}
		public virtual object VisitPropertySetRegion(PropertySetRegion propertySetRegion, object data) {
			Debug.Assert((propertySetRegion != null));
			Debug.Assert((propertySetRegion.Attributes != null));
			Debug.Assert((propertySetRegion.Block != null));
			Debug.Assert((propertySetRegion.Parameters != null));
			for (int i = 0; i < propertySetRegion.Attributes.Count; i++) {
				AttributeSection o = propertySetRegion.Attributes[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (AttributeSection)nodeStack.Pop();
				if (o == null)
					propertySetRegion.Attributes.RemoveAt(i--);
				else
					propertySetRegion.Attributes[i] = o;
			}
			nodeStack.Push(propertySetRegion.Block);
			propertySetRegion.Block.AcceptVisitor(this, data);
			propertySetRegion.Block = ((BlockStatement)(nodeStack.Pop()));
			for (int i = 0; i < propertySetRegion.Parameters.Count; i++) {
				ParameterDeclarationExpression o = propertySetRegion.Parameters[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (ParameterDeclarationExpression)nodeStack.Pop();
				if (o == null)
					propertySetRegion.Parameters.RemoveAt(i--);
				else
					propertySetRegion.Parameters[i] = o;
			}
			return null;
		}
		public virtual object VisitPropertySetRegion(PropertySetRegion propertySetRegion, object data) {
			throw new global::System.NotImplementedException("PropertySetRegion");
		}
Example #11
0
		public PropertyDeclaration(Modifiers modifier, List<AttributeSection> attributes, string name, List<ParameterDeclarationExpression> parameters) {
			Modifier = modifier;
			Attributes = attributes;
			Name = name;
			Parameters = parameters;
			bodyStart = Location.Empty;
			bodyEnd = Location.Empty;
			getRegion = PropertyGetRegion.Null;
			setRegion = PropertySetRegion.Null;
		}
Example #12
0
		public IndexerDeclaration(TypeReference typeReference, List<ParameterDeclarationExpression> parameters, Modifiers modifier, List<AttributeSection> attributes) {
			TypeReference = typeReference;
			Parameters = parameters;
			Modifier = modifier;
			Attributes = attributes;
			interfaceImplementations = new List<InterfaceImplementation>();
			bodyStart = Location.Empty;
			bodyEnd = Location.Empty;
			getRegion = PropertyGetRegion.Null;
			setRegion = PropertySetRegion.Null;
		}