Checkpoint
This commit is contained in:
parent
43b364044e
commit
9db1c66781
34 changed files with 746 additions and 194 deletions
16
src/Main.kt
16
src/Main.kt
|
@ -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())
|
||||
}
|
||||
|
|
Reference in a new issue