Refactored Main.Scala using Scallop "subcommands" instead of "options" for everything, which is probably the intended abstraction for the usecase. Also made use of some other features from the Scallop library, such as opt[Path] and validatePathExists(), which makes it so we don't have to check if input files exist ourselves.
The JVM compilation behavior is different from how it was before. I don't know how exactly it is supposed to be.
Refactored Main.Scala using Scallop "subcommands" instead of "options" for everything, which is probably the intended abstraction for the usecase. Also made use of some other features from the Scallop library, such as opt[Path] and validatePathExists(), which makes it so we don't have to check if input files exist ourselves.
The JVM compilation behavior is different from how it was before. I don't know how exactly it is supposed to be.
Usage:
java -jar oberon.jar compile --input test.oberon --output test.c --backend c
java -jar oberon.jar compile -i test.oberon -o test.c -b c
java -jar oberon.jar compile -i test.oberon -o test.llvm -b llvm
java -jar oberon.jar interpreter -i test.oberon
java -jar oberon.jar repl