Improved project structure

This commit is contained in:
Eduard Urbach 2023-10-20 17:07:44 +02:00
parent 3a002a7562
commit bd73132a30
Signed by: eduard
GPG key ID: 49226B848C78F6C8
18 changed files with 33 additions and 15 deletions

21
src/cli/Main.go Normal file
View file

@ -0,0 +1,21 @@
package cli
// Main is the entry point for the CLI frontend.
// It returns the exit code of the compiler.
// We never call os.Exit directly here because it's bad for testing.
func Main(args []string) int {
if len(args) == 0 {
return Help(nil)
}
switch args[0] {
case "build":
return Build(args[1:])
case "system":
return System(args[1:])
default:
return Help(args[1:])
}
}