Add function to Print to print only stack.

This commit is contained in:
James Roseborough
2015-03-22 16:53:35 +00:00
parent ba43e15e72
commit d0e0fd4445

View File

@@ -405,7 +405,11 @@ public class Print extends Lua {
ps.close();
ps = previous;
format( baos.toString(), 50 );
printStack(stack, top, varargs);
ps.println();
}
public static void printStack(LuaValue[] stack, int top, Varargs varargs) {
// print stack
ps.print('[');
for ( int i=0; i<stack.length; i++ ) {
@@ -440,9 +444,6 @@ public class Print extends Lua {
ps.print( " | " );
}
ps.print(varargs);
ps.println();
}
}
}