Esempio n. 1
0
File: Copy.cs Progetto: ggrov/tacny
 public static MemberDecl CopyMember(MemberDecl md) {
   Contract.Requires(md != null);
   Cloner cl = new Cloner();
   return cl.CloneMember(md);
 }
Esempio n. 2
0
File: Copy.cs Progetto: ggrov/tacny
 /// <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);
 }
Esempio n. 3
0
File: Copy.cs Progetto: ggrov/tacny
 /// <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;
 }
Esempio n. 6
0
File: Dare.cs Progetto: ggrov/tacny
 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());
 }
Esempio n. 7
0
    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());
    }