コード例 #1
0
ファイル: AstDeclaration.cs プロジェクト: CheezLang/CheezLang
 public override AstStatement Clone()
 => CopyValuesTo(new AstConstantDeclaration(
                     Pattern.Clone(),
                     TypeExpr?.Clone(),
                     Initializer.Clone(),
                     Documentation,
                     Directives?.Select(d => d.Clone()).ToList()));
コード例 #2
0
        public override void Clone(JsNode node)
        {
            base.Clone(node);
            var node2 = (JsVariableDeclarator)node;

            node2.Name        = Name;
            node2.Initializer = Initializer.Clone();
        }
        public override Expression Clone()
        {
            InitializerExpression initializerClone = Initializer != null?Initializer.Clone() as InitializerExpression : null;

            AnonymousObjectCreationExpression result = new AnonymousObjectCreationExpression(Constructor, Type, initializerClone, this.instructions);

            return(result);
        }
コード例 #4
0
        public override void Clone(JsNode node)
        {
            base.Clone(node);
            var node2 = (JsForInStatement)node;

            node2.Initializer = Initializer.Clone();
            node2.Member      = Member.Clone();
            node2.Statement   = Statement.Clone();
        }
コード例 #5
0
        public override Statement Clone()
        {
            BlockStatement clonedBody = body != null?body.Clone() as BlockStatement : null;

            ForStatement result = new ForStatement(Initializer.Clone(), Condition.Clone(), Increment.Clone(), clonedBody);

            result.ConditionBlock = this.ConditionBlock;
            CopyParentAndLabel(result);
            return(result);
        }
コード例 #6
0
ファイル: for.cs プロジェクト: formist/LinkMe
 public override AstNode Clone()
 {
     return(new ForNode(
                (Context == null ? null : Context.Clone()),
                Parser,
                (Initializer == null ? null : Initializer.Clone()),
                (Condition == null ? null : Condition.Clone()),
                (Incrementer == null ? null : Incrementer.Clone()),
                (Body == null ? null : Body.Clone())
                ));
 }
コード例 #7
0
        public override Expression Clone()
        {
            InitializerExpression initializerClone = Initializer != null ? (InitializerExpression)Initializer.Clone() : null;

            return(new ArrayCreationExpression(ElementType, initializerClone, instructions)
            {
                Dimensions = Dimensions.Clone()
            });
        }