progress #369
This commit is contained in:
parent
6c819429d7
commit
fc1706d0c2
|
@ -302,7 +302,7 @@ public abstract class AbstractEvaluator<T> {
|
|||
throw new IllegalArgumentException("Parentheses mismatched");
|
||||
}
|
||||
if (!stack.isEmpty() && stack.peek().isFunction()) {
|
||||
rpnPush("function", stack.peek().getLiteral());
|
||||
rpnPush("function", stack.peek().getFunction().getName());
|
||||
// If the token at the top of the stack is a function token, pop it
|
||||
// onto the output queue.
|
||||
int argCount = values.size()-previousValuesSize.pop();
|
||||
|
|
|
@ -9,9 +9,13 @@ import java.util.Stack;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* @see DoubleEvaluator
|
||||
*/
|
||||
public class ParserTest {
|
||||
@Test
|
||||
public void testFunctionParameters() {
|
||||
assertParse("3 log", "log(3)");
|
||||
// todo: parameter order needs to be in postfix form
|
||||
// assertParseB("fsio_setting 0", "fsio_setting 0");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue