Argument parsing
This commit is contained in:
parent
32165a90f5
commit
8e6a34a231
5 changed files with 63 additions and 8 deletions
|
@ -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"
|
||||
}
|
||||
|
|
Reference in a new issue