major main.c refactoring

- now takes command line arguments:
Usage: ./bin/cosmo [-clsr] [args]

available options are:
-c <in> <out>   compile <in> and dump to <out>
-l <in>         load dump from <in>
-s <in...>              compile and run <in...> script(s)
-r                      start the repl
This commit is contained in:
2023-05-28 20:52:12 -05:00
parent 93a09698a9
commit 8c6ba18848
3 changed files with 137 additions and 38 deletions

View File

@@ -980,6 +980,4 @@ void cosmoB_loadVM(CState *state)
// register "vm" to the global table
cosmoV_register(state, 1);
printf("[WARNING] the vm.* library has been loaded!\n");
}