1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-06-30 06:40:58 -07:00
Abacus/core/src/main/kotlin/org/nwapw/abacus/tree/TreeValueFunctionNode.kt

17 lines
499 B
Kotlin
Raw Normal View History

package org.nwapw.abacus.tree
/**
* A tree node that represents a tree value function call.
*
* This is in many ways similar to a simple FunctionNode, and the distinction
* is mostly to help the reducer. Besides that, this class also does not
* even attempt to reduce its children.
*/
2017-09-07 12:31:40 -07:00
class TreeValueFunctionNode(name: String, children: List<TreeNode>) : CallNode(name, children) {
2017-09-07 12:53:12 -07:00
override fun <T : Any> reduce(reducer: Reducer<T>): T {
return reducer.reduceNode(this)
}
}