/** * Eval a print statement by evaluating each argument and using Java's * println to print it out. */ public void evalPrint(TreeNode1 printStmt, SymbolTable symtab) { Value val; for (TreeNodeList list = (TreeNodeList) printStmt.child; list != null; list = list.siblings) { val = eval(list.node, symtab); if (val != null) { System.out.print(val.val); } } }