public override object Visit(PropertySetRegion PropertySetRegion, object data) { return null; }
public override object Visit(PropertySetRegion PropertySetRegion, object data) { Console.WriteLine(PropertySetRegion.ToString()); return PropertySetRegion.AcceptChildren(this, data); }
public override object Visit(PropertySetRegion propertySetRegion, object data) { DebugOutput(propertySetRegion); AppendAttributes(propertySetRegion.Attributes); AppendIndentation();sourceText.Append("Set"); AppendNewLine(); if (propertySetRegion.Block != null) { ++indentLevel; propertySetRegion.Block.AcceptVisitor(this, data); --indentLevel; } AppendIndentation();sourceText.Append("End Set"); AppendNewLine(); return null; }
public virtual object Visit(PropertySetRegion propertySetRegion, object data) { foreach (AttributeSection section in propertySetRegion.Attributes) { section.AcceptVisitor(this, data); } blockStack.Push(propertySetRegion.Block); object ret = data; if (propertySetRegion.Block != null) { ret = propertySetRegion.Block.AcceptChildren(this, data); } blockStack.Pop(); return ret; }
void SetAccessorDecl( #line 1342 "cs.ATG" out PropertySetRegion setBlock, ArrayList attributes, Modifier m) { #line 1343 "cs.ATG" Statement stmt = null; Expect(1); #line 1346 "cs.ATG" Point startLocation = t.Location; #line 1347 "cs.ATG" if (t.val != "set") Error("set expected"); if (la.kind == 14) { Block( #line 1348 "cs.ATG" out stmt); } else if (la.kind == 10) { lexer.NextToken(); } else SynErr(164); #line 1349 "cs.ATG" setBlock = new PropertySetRegion((BlockStatement)stmt, attributes, m); #line 1350 "cs.ATG" setBlock.StartLocation = startLocation; #line 1351 "cs.ATG" setBlock.EndLocation = t.Location; }
void InterfaceAccessors( #line 1376 "cs.ATG" out PropertyGetRegion getBlock, out PropertySetRegion setBlock) { #line 1378 "cs.ATG" AttributeSection section; ArrayList attributes = new ArrayList(); getBlock = null; setBlock = null; while (la.kind == 16) { AttributeSection( #line 1383 "cs.ATG" out section); #line 1383 "cs.ATG" attributes.Add(section); } if ( #line 1385 "cs.ATG" IdentIsGet()) { Expect(1); #line 1385 "cs.ATG" getBlock = new PropertyGetRegion(null, attributes); } else if ( #line 1386 "cs.ATG" IdentIsSet()) { Expect(1); #line 1386 "cs.ATG" setBlock = new PropertySetRegion(null, attributes); } else if (la.kind == 1) { lexer.NextToken(); #line 1387 "cs.ATG" Error("set or get expected"); } else SynErr(161); Expect(10); #line 1389 "cs.ATG" attributes = new ArrayList(); if (la.kind == 1 || la.kind == 16) { while (la.kind == 16) { AttributeSection( #line 1391 "cs.ATG" out section); #line 1391 "cs.ATG" attributes.Add(section); } if ( #line 1393 "cs.ATG" IdentIsGet()) { Expect(1); #line 1393 "cs.ATG" if (getBlock != null) Error("get already declared"); else getBlock = new PropertyGetRegion(null, attributes); } else if ( #line 1396 "cs.ATG" IdentIsSet()) { Expect(1); #line 1396 "cs.ATG" if (setBlock != null) Error("set already declared"); else setBlock = new PropertySetRegion(null, attributes); } else if (la.kind == 1) { lexer.NextToken(); #line 1399 "cs.ATG" Error("set or get expected"); } else SynErr(162); Expect(10); } }
void AccessorDecls( #line 1300 "cs.ATG" out PropertyGetRegion getBlock, out PropertySetRegion setBlock) { #line 1302 "cs.ATG" ArrayList attributes = new ArrayList(); Modifiers m = new Modifiers (this); AttributeSection section; getBlock = null; setBlock = null; while (la.kind == 16) { AttributeSection( #line 1309 "cs.ATG" out section); #line 1309 "cs.ATG" attributes.Add(section); } while (StartOf(22)) { AccessorModifier( #line 1310 "cs.ATG" m); } if ( #line 1312 "cs.ATG" IdentIsGet()) { GetAccessorDecl( #line 1313 "cs.ATG" out getBlock, attributes, m.Modifier); if (StartOf(23)) { #line 1314 "cs.ATG" attributes = new ArrayList(); m = new Modifiers (this); while (la.kind == 16) { AttributeSection( #line 1315 "cs.ATG" out section); #line 1315 "cs.ATG" attributes.Add(section); } while (StartOf(22)) { AccessorModifier( #line 1316 "cs.ATG" m); } SetAccessorDecl( #line 1317 "cs.ATG" out setBlock, attributes, m.Modifier); } } else if ( #line 1319 "cs.ATG" IdentIsSet()) { SetAccessorDecl( #line 1320 "cs.ATG" out setBlock, attributes, m.Modifier); if (StartOf(23)) { #line 1321 "cs.ATG" attributes = new ArrayList(); m = new Modifiers (this); while (la.kind == 16) { AttributeSection( #line 1322 "cs.ATG" out section); #line 1322 "cs.ATG" attributes.Add(section); } while (StartOf(22)) { AccessorModifier( #line 1323 "cs.ATG" m); } GetAccessorDecl( #line 1324 "cs.ATG" out getBlock, attributes, m.Modifier); } } else if (la.kind == 1) { lexer.NextToken(); #line 1326 "cs.ATG" Error("get or set accessor declaration expected"); } else SynErr(160); }
public override object Visit(PropertySetRegion setRegion, object data) { this.VisitAttributes(setRegion.Attributes, data); outputFormatter.Indent(); VisitModifier(setRegion.Modifier); outputFormatter.PrintIdentifier("set"); if (setRegion.Block == null) { outputFormatter.PrintToken(Tokens.Semicolon); } else { outputFormatter.Space(); outputFormatter.PrintToken(Tokens.OpenCurlyBrace); outputFormatter.NewLine(); ++outputFormatter.IndentationLevel; setRegion.Block.AcceptChildren(this, false); --outputFormatter.IndentationLevel; outputFormatter.Indent(); outputFormatter.PrintToken(Tokens.CloseCurlyBrace); } outputFormatter.NewLine(); return null; }