Checkpoint

This commit is contained in:
Tibo De Peuter 2025-05-01 17:13:35 +02:00
parent 43b364044e
commit 9db1c66781
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
34 changed files with 746 additions and 194 deletions

View file

@ -5,7 +5,7 @@ import io.GhentPrologArgParser
import io.Logger
import repl.Repl
fun main(args: Array<String>) = mainBody {
fun main(args: Array<String>) {
// Parse command line arguments
val parsedArgs = ArgParser(args).parseInto(::GhentPrologArgParser)
@ -22,21 +22,9 @@ fun main(args: Array<String>) = mainBody {
// Check if REPL was requested
if (repl) {
Repl().start()
Repl()
} else {
Logger.warn("REPL not started. Use -r or --repl to start the REPL.")
}
}
}
fun help() {
println("""
Ghent Prolog: A Prolog interpreter in Kotlin
Options:
-s, --source <file> Specify the source file to load
-r, --repl Start the REPL (default)
-v, --verb
-h, --help Show this help message
""".trimIndent())
}