Esempio n. 1
0
        // UnboundAssignment
        private Expression Rewrite(UnboundAssignment node)
        {
            Expression expression = RewriteExpression(node.Value);

            if ((object)expression != (object)node.Value)
            {
                return(Ast.Assign(node.Name, expression));
            }
            else
            {
                return(node);
            }
        }
Esempio n. 2
0
        // BoundAssignment
        private Expression Rewrite(BoundAssignment node)
        {
            Expression value = RewriteExpression(node.Value);

            if ((object)value != (object)node.Value)
            {
                return(Ast.Assign(node.Variable, value));
            }
            else
            {
                return(node);
            }
        }