Пример #1
0
        /// <summary>
        /// Will perform:
        ///     save: temp = expression
        ///     return value: temp
        /// </summary>
        private Expression ToTemp(Expression expression, out Expression save)
        {
            Variable temp = Temp(expression.Type);

            save = Ast.Assign(temp, expression);
            return(Ast.Read(temp));
        }
Пример #2
0
 /// <summary>
 /// Performs an assignment variable = value
 /// </summary>
 public static Statement Write(Variable variable, Variable value)
 {
     //return Statement(Assign(variable, Ast.Read(value)));
     return(new WriteStatement(variable, Ast.Read(value)));
 }