mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-28 09:35:19 +00:00
Implement the ability to reduce a tree to a single variable of a type.
This commit is contained in:
@@ -44,4 +44,9 @@ public class NumberNode extends TreeNode {
|
||||
public NumberInterface getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T reduce(Reducer<T> reducer) {
|
||||
return reducer.reduceNode(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user