public static MemberDecl CopyMember(MemberDecl md) { Contract.Requires(md != null); Cloner cl = new Cloner(); return cl.CloneMember(md); }
/// <summary> /// Deep copy a statement /// </summary> /// <typeparam name="T"></typeparam> /// <param name="item"></param> /// <returns></returns> public static Statement CopyStatement(Statement item) { Cloner cl = new Cloner(); return cl.CloneStmt(item); }
/// <summary> /// Deep copy an expression /// </summary> /// <param name="exp"></param> /// <returns></returns> public static Expression CopyExpression(Expression exp) { Cloner cl = new Cloner(); return cl.CloneExpr(exp); }
RefinementCloner refinementCloner; // This cloner wraps things in a RefinementToken #endregion Fields #region Constructors public RefinementTransformer(ErrorReporter reporter) : base(reporter) { rawCloner = new Cloner(); }
public SubstitutionCloner(Dictionary<string, Expression> subs, Cloner c) { Exprs = subs; SubstitutionsMade = new SortedSet<string>(); this.c = c; }
public static Program CloneProgram(Program program) { var cloner = new Cloner(); var moduleDecl = new LiteralModuleDecl(cloner.CloneModuleDefinition(program.DefaultModuleDef, program.Name), null); return new Program(program.FullName, moduleDecl, program.BuiltIns, new InvisibleErrorReporter()); }
private ExpressionTree _CopyTree() { var cl = new Cloner(); if (IsLeaf()) return new ExpressionTree(cl.CloneExpr(Data), null, null, null, Root); return new ExpressionTree(cl.CloneExpr(Data), null, LChild._CopyTree(), RChild?._CopyTree()); }