public override object Visit(EventAddRegion eventAddRegion, object data) { return null; }
public override object Visit(EventAddRegion eventAddRegion, object data) { // should never be called: throw new System.NotSupportedException(); }
public override object Visit(EventAddRegion eventAddRegion, object data) { Console.WriteLine(eventAddRegion.ToString()); return eventAddRegion.AcceptChildren(this, data); }
public virtual object Visit(EventAddRegion eventAddRegion, object data) { foreach (AttributeSection section in eventAddRegion.Attributes) { section.AcceptVisitor(this, data); } blockStack.Push(eventAddRegion.Block); object ret = data; if (eventAddRegion.Block != null) { ret = eventAddRegion.Block.AcceptChildren(this, data); } blockStack.Pop(); return ret; }
void EventAccessorDecls( #line 1354 "cs.ATG" out EventAddRegion addBlock, out EventRemoveRegion removeBlock) { #line 1355 "cs.ATG" AttributeSection section; ArrayList attributes = new ArrayList(); Statement stmt; addBlock = null; removeBlock = null; while (la.kind == 16) { AttributeSection( #line 1362 "cs.ATG" out section); #line 1362 "cs.ATG" attributes.Add(section); } if ( #line 1364 "cs.ATG" IdentIsAdd()) { #line 1364 "cs.ATG" addBlock = new EventAddRegion(attributes); AddAccessorDecl( #line 1365 "cs.ATG" out stmt); #line 1365 "cs.ATG" attributes = new ArrayList(); addBlock.Block = (BlockStatement)stmt; while (la.kind == 16) { AttributeSection( #line 1366 "cs.ATG" out section); #line 1366 "cs.ATG" attributes.Add(section); } RemoveAccessorDecl( #line 1367 "cs.ATG" out stmt); #line 1367 "cs.ATG" removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; } else if ( #line 1368 "cs.ATG" IdentIsRemove()) { RemoveAccessorDecl( #line 1369 "cs.ATG" out stmt); #line 1369 "cs.ATG" removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; attributes = new ArrayList(); while (la.kind == 16) { AttributeSection( #line 1370 "cs.ATG" out section); #line 1370 "cs.ATG" attributes.Add(section); } AddAccessorDecl( #line 1371 "cs.ATG" out stmt); #line 1371 "cs.ATG" addBlock = new EventAddRegion(attributes); addBlock.Block = (BlockStatement)stmt; } else if (la.kind == 1) { lexer.NextToken(); #line 1372 "cs.ATG" Error("add or remove accessor declaration expected"); } else SynErr(157); }
public override object Visit(EventAddRegion addRegion, object data) { VisitAttributes(addRegion.Attributes, data); outputFormatter.Indent(); outputFormatter.PrintIdentifier("add"); if (addRegion.Block == null) { outputFormatter.PrintToken(Tokens.Semicolon); outputFormatter.NewLine(); } else { outputFormatter.BeginBrace(this.prettyPrintOptions.PropertyGetBraceStyle); addRegion.Block.AcceptChildren(this, false); outputFormatter.EndBrace(); } return null; }