Add debug println statements in Shell.execCommand and adjust ConsoleView input handling

This commit is contained in:
2025-08-15 14:31:33 +02:00
parent 4b17ce3cf5
commit 11da7fd588
2 changed files with 3 additions and 1 deletions

View File

@@ -77,6 +77,7 @@ object Shell {
}
fun execCommand(command: String, computer: MonTanaMiniComputer) {
println("Exec: $command")
val tokens = MTMCTokenizer(command, "#")
try {
val identifier = tokens.matchAndConsume(MTMCToken.TokenType.IDENTIFIER)
@@ -101,6 +102,7 @@ object Shell {
if (isCommand(cmd)) {
COMMANDS[cmd.lowercase()]!!.exec(tokens, computer)
} else {
println("Executing: $command")
tokens.reset()
val asm = mutableListOf<MTMCToken>()
asm.addAll(tokens.tokens)

View File

@@ -53,10 +53,10 @@ class ConsoleView(
private fun handleCommand() {
history.add(input)
input = ""
Shell.execCommand(input, computer)
input = ""
mainView.requestUpdate()
}