/** * Gets the operands for this operator from the stack * * @param s the token stack */ public void getOperands(Stack s) { // parameters are in the correct order, god damn them ParseItem[] items = new ParseItem[function.getNumArgs()]; // modified in 2.4.3 for (int i = function.getNumArgs() - 1; i >= 0; i--) { ParseItem pi = (ParseItem) s.pop(); items[i] = pi; } for (int i = 0; i < function.getNumArgs(); i++) { add(items[i]); } }
/** * Gets the operands for this operator from the stack * * @param s the token stack */ public void getOperands(Stack s) { // parameters are in the correct order, god damn them ParseItem[] items = new ParseItem[function.getNumArgs()]; // modified in 2.4.3 for (int i = function.getNumArgs() - 1; i >= 0; i--) { ParseItem pi = (ParseItem) s.pop(); items[i] = pi; } for (int i = 0; i < function.getNumArgs(); i++) { add(items[i]); } }