public override Block VisitBlock(Block block) { if (block == null) return null; Block dup = (Block)this.DuplicateFor[block.UniqueKey]; if (dup != null) return dup; this.DuplicateFor[block.UniqueKey] = dup = (Block)block.Clone(); return base.VisitBlock(dup); }
// we don't want to duplicate below blocks. public override Block VisitBlock(Block block) { block = (Block)(block.Clone()); block.Statements = this.VisitStatementList(block.Statements); return block; }