mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-10 17:25:19 +00:00
Fix several bugs and register operations as operations.
This commit is contained in:
@@ -30,7 +30,7 @@ public class NumberReducer implements Reducer<NumberInterface> {
|
||||
} else if(node instanceof OpNode){
|
||||
NumberInterface left = (NumberInterface) children[0];
|
||||
NumberInterface right = (NumberInterface) children[1];
|
||||
Function function = manager.functionFor(((OpNode) node).getOperation());
|
||||
Function function = manager.operatorFor(((OpNode) node).getOperation()).getFunction();
|
||||
if(function == null) return null;
|
||||
return function.apply(left, right);
|
||||
} else if(node instanceof FunctionNode){
|
||||
|
||||
Reference in New Issue
Block a user