public override object Visit(EventRemoveRegion eventRemoveRegion, object data) { return null; }
public override object Visit(EventRemoveRegion eventRemoveRegion, object data) { // should never be called: throw new System.NotSupportedException(); }
public override object Visit(EventRemoveRegion eventRemoveRegion, object data) { Console.WriteLine(eventRemoveRegion.ToString()); return eventRemoveRegion.AcceptChildren(this, data); }
public virtual object Visit(EventRemoveRegion eventRemoveRegion, object data) { foreach (AttributeSection section in eventRemoveRegion.Attributes) { section.AcceptVisitor(this, data); } blockStack.Push(eventRemoveRegion.Block); object ret = data; if (eventRemoveRegion.Block != null) { eventRemoveRegion.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(EventRemoveRegion removeRegion, object data) { VisitAttributes(removeRegion.Attributes, data); outputFormatter.Indent(); outputFormatter.PrintIdentifier("remove"); if (removeRegion.Block == null) { outputFormatter.PrintToken(Tokens.Semicolon); outputFormatter.NewLine(); } else { outputFormatter.BeginBrace(this.prettyPrintOptions.PropertySetBraceStyle); removeRegion.Block.AcceptChildren(this, false); outputFormatter.EndBrace(); } return null; }