示例#1
0
 public override AstGetSet GetCopy()
 {
     var expr2 = Expression == null ? null : Expression.GetCopy();
     var newDecl2 = new AstGetSetNewDecl(Position, _id, expr2);
     CopyBaseMembers(newDecl2);
     return newDecl2;
 }
示例#2
0
        public override bool TryOptimize(CompilerTarget target, out AstExpr expr)
        {
            var wrappedExpr = (AstExpr) Expression;
            if (wrappedExpr != null)
            {
                _OptimizeNode(target, ref wrappedExpr);
                var optExpr = wrappedExpr as AstGetSet;
                if (optExpr != null)
                {
                    expr = new AstGetSetNewDecl(Position, _id, optExpr);
                    return true;
                }
            }

            expr = null;
            return false;
        }