Argument parsing

This commit is contained in:
Tibo De Peuter 2025-04-28 13:36:24 +02:00
parent 32165a90f5
commit 8e6a34a231
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
5 changed files with 63 additions and 8 deletions

View file

@ -144,7 +144,7 @@ class Divide(private val expr1: Expression, private val expr2: Expression) :
// TODO Expr rem Expr
class Between(private val expr1: Expression, private val expr2: Expression, private val expr3: Expression) :
Operator(Atom("between"), expr1, expr2) {
CompoundTerm(Atom("between"), listOf(expr1, expr2, expr3)), Satisfiable {
override fun satisfy(subs: Substitutions): Answers {
val e1 = expr1.simplify(subs)
val e2 = expr2.simplify(subs)
@ -165,4 +165,6 @@ class Between(private val expr1: Expression, private val expr2: Expression, priv
}
}
}
override fun toString(): String = "$expr1..$expr3..$expr2"
}