mirror of
https://github.com/DanilaFe/abacus
synced 2024-11-17 16:09:32 -08:00
Fix toString errors failing unit tests.
This commit is contained in:
parent
ba39ee1fad
commit
b45c7e2d1b
|
@ -28,7 +28,7 @@ data class FunctionNode(val function: String) : TreeNode() {
|
||||||
buffer.append(children[i].toString())
|
buffer.append(children[i].toString())
|
||||||
buffer.append(if (i == children.size - 1) ")" else ",")
|
buffer.append(if (i == children.size - 1) ")" else ",")
|
||||||
}
|
}
|
||||||
return super.toString()
|
return buffer.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,4 +16,8 @@ data class UnaryNode(val operation: String, val applyTo: TreeNode? = null) : Tre
|
||||||
return reducer.reduceNode(this, reducedChild)
|
return reducer.reduceNode(this, reducedChild)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "(" + (applyTo?.toString() ?: "null") + ")" + operation
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user