Retract
This commit is contained in:
parent
80fb3d1e60
commit
5bfa1691dd
10 changed files with 276 additions and 17 deletions
|
@ -42,10 +42,9 @@ class Repl {
|
|||
val iterator = answers.iterator()
|
||||
|
||||
if (!iterator.hasNext()) {
|
||||
io.say("false.")
|
||||
io.say("false.\n")
|
||||
} else {
|
||||
var previous = iterator.next()
|
||||
io.say(prettyPrint(previous))
|
||||
io.say(prettyPrint(iterator.next()))
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
var command = io.prompt("")
|
||||
|
@ -57,8 +56,7 @@ class Repl {
|
|||
|
||||
when (command) {
|
||||
";" -> {
|
||||
previous = iterator.next()
|
||||
io.say(prettyPrint(previous))
|
||||
io.say(prettyPrint(iterator.next()))
|
||||
}
|
||||
"a" -> return
|
||||
"." -> return
|
||||
|
@ -88,7 +86,7 @@ class Repl {
|
|||
val subs = result.getOrNull()!!
|
||||
if (subs.isEmpty()) {
|
||||
io.checkNewLine()
|
||||
return "true.\n"
|
||||
return "true."
|
||||
}
|
||||
return subs.entries.joinToString(",\n") { "${it.key} = ${it.value}" }
|
||||
},
|
||||
|
|
Reference in a new issue