diff --git a/core/src/main/kotlin/org/nwapw/abacus/tree/BinaryNode.kt b/core/src/main/kotlin/org/nwapw/abacus/tree/BinaryNode.kt index 7505f82..01efa8d 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/tree/BinaryNode.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/tree/BinaryNode.kt @@ -11,7 +11,7 @@ package org.nwapw.abacus.tree * @param left the left node. * @param right the right node. */ -data class BinaryNode(val operation: String, val left: TreeNode? = null, val right: TreeNode?) : TreeNode() { +class BinaryNode(val operation: String, val left: TreeNode? = null, val right: TreeNode?) : TreeNode() { override fun reduce(reducer: Reducer): T? { val leftReduce = left?.reduce(reducer) ?: return null diff --git a/core/src/main/kotlin/org/nwapw/abacus/tree/FunctionNode.kt b/core/src/main/kotlin/org/nwapw/abacus/tree/FunctionNode.kt index 64c1298..dcc8b09 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/tree/FunctionNode.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/tree/FunctionNode.kt @@ -8,7 +8,7 @@ package org.nwapw.abacus.tree * * @param function the function string. */ -data class FunctionNode(val function: String) : TreeNode() { +class FunctionNode(val function: String) : TreeNode() { /** * List of function parameters added to this node. diff --git a/core/src/main/kotlin/org/nwapw/abacus/tree/NumberNode.kt b/core/src/main/kotlin/org/nwapw/abacus/tree/NumberNode.kt index de6597a..624a50a 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/tree/NumberNode.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/tree/NumberNode.kt @@ -10,7 +10,7 @@ import org.nwapw.abacus.number.NumberInterface * * @number the number value of this node. */ -data class NumberNode(val number: String) : TreeNode() { +class NumberNode(val number: String) : TreeNode() { override fun reduce(reducer: Reducer): T? { return reducer.reduceNode(this) diff --git a/core/src/main/kotlin/org/nwapw/abacus/tree/UnaryNode.kt b/core/src/main/kotlin/org/nwapw/abacus/tree/UnaryNode.kt index 65853ba..c2375b2 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/tree/UnaryNode.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/tree/UnaryNode.kt @@ -9,7 +9,7 @@ package org.nwapw.abacus.tree * @param operation the operation applied to the given node. * @param applyTo the node to which the operation will be applied. */ -data class UnaryNode(val operation: String, val applyTo: TreeNode? = null) : TreeNode() { +class UnaryNode(val operation: String, val applyTo: TreeNode? = null) : TreeNode() { override fun reduce(reducer: Reducer): T? { val reducedChild = applyTo?.reduce(reducer) ?: return null diff --git a/core/src/main/kotlin/org/nwapw/abacus/tree/VariableNode.kt b/core/src/main/kotlin/org/nwapw/abacus/tree/VariableNode.kt index 0bf05c6..93d91dc 100644 --- a/core/src/main/kotlin/org/nwapw/abacus/tree/VariableNode.kt +++ b/core/src/main/kotlin/org/nwapw/abacus/tree/VariableNode.kt @@ -8,7 +8,7 @@ package org.nwapw.abacus.tree * * @param variable the actual variable name that this node represents. */ -data class VariableNode(val variable: String) : TreeNode() { +class VariableNode(val variable: String) : TreeNode() { override fun reduce(reducer: Reducer): T? { return reducer.reduceNode(this)