package calculator.interpreter.ast;
import java.util.LinkedList;
import calculator.interpreter.Cell;
import calculator.interpreter.Environment;
/**
* The print statement
*/
public class PrintStatement extends Statement {
/** the values to print */
public final LinkedList<Expression> values = new LinkedList<Expression>();
@Override
public Environment eval(Environment env, Cell result) {
for (Expression e : values) {
System.out.print(e.eval(env));
}
System.out.println();
return env;
}
}