marsc – compiler for programs written in the Mars language
marsc is the compiler for the Mars programming language. This command takes a single Mars program, and compiles it with a particular backend.
This program isn’t particularly useful right now; all of the backends are used mainly for debugging.
Future versions of Mars may have useful backends (ie. compilation to native code or other executable file formats).
Compile to the given output filename. If unspecified, the output filename will be based on the input filename, but with a different extension (depending on the backend).
Use a specific backend. This determines what format the output file will be in.
The default backend is asm.
Backends available: pretty, asm.
Specify the name of the main function (program entrypoint). This names the function which will be executed upon program startup. It must have type () -> Int.
If unspecified, there will be no function called at startup, and the program will serve as a library only.
Display a short help page, then quit.
Display version and copyright information, then quit.
marsc will exit with a status of 1 if any fatal errors occur, including compiler errors or illegal main functions.
Otherwise, marsc will set its exit status to 0.