Checkpoint
This commit is contained in:
parent
438af6c053
commit
6eca9dfcb7
25 changed files with 309 additions and 113 deletions
|
@ -1,19 +0,0 @@
|
|||
package prolog.components
|
||||
|
||||
import prolog.components.terms.Argument
|
||||
import prolog.components.terms.Atom
|
||||
|
||||
open class Operator(
|
||||
val symbol: Atom,
|
||||
val leftOperand: Operand? = null,
|
||||
val rightOperand: Operand
|
||||
) {
|
||||
override fun toString(): String {
|
||||
return when (leftOperand) {
|
||||
null -> "${symbol.name} $rightOperand"
|
||||
else -> "$leftOperand ${symbol.name} $rightOperand"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typealias Operand = Argument
|
Reference in a new issue