- Upgraded to jcli 0.25.1-beta
- Added aggregate command-line arguments `library-link` to support future library linking
- Added stub mixin template `TypeCheckerBase`
- Made verbosity an optional flag
This commit is contained in:
Tristan B. Velloza Kildaire 2023-01-26 16:32:55 +02:00
parent 3f84020e22
commit a5d1617d15
3 changed files with 22 additions and 10 deletions

View File

@ -5,7 +5,7 @@
"copyright": "Copyright © 2021-2023, Tristan B. Kildaire",
"dependencies": {
"gogga": "~>0.1.0",
"jcli": "~>0.24.0"
"jcli": "0.25.0-beta.1"
},
"description": "The official Tristan language compiler project",
"license": "GPLv3",

View File

@ -1,12 +1,9 @@
module commandline.args;
import jcli;
import jcli.commandgraph.cli;
void parseCommandLine(string[] arguments)
{
/* Create an instance of the JCLI command-line parser */
CommandLineInterface!(commandline.commands) commandLineSystem = new CommandLineInterface!(commandline.commands)();
/* Parse the command-line arguments */
commandLineSystem.parseAndExecute(arguments);
matchAndExecuteAcrossModules!(commandline.commands)(arguments[1..arguments.length]);
}

View File

@ -43,6 +43,7 @@ mixin template BaseCommand()
string sourceFile;
@ArgNamed("verbose|v", "Verbosity level")
@(ArgConfig.optional)
VerbosityLevel debugLevel;
void BaseCommandInit(Compiler compiler)
@ -61,20 +62,26 @@ mixin template EmitBase()
@ArgGroup("Emit", "Options pertaining to the code emitter")
{
@ArgNamed("symbol-mapper|sm", "The symbol mapping technique to use")
@(ArgExistence.optional)
@(ArgConfig.optional)
SymbolMappingTechnique symbolTechnique;
@ArgNamed("prettygen|pg", "Generate pretty-printed code")
@(ArgExistence.optional)
@(ArgConfig.optional)
bool prettyPrintCodeGen;
@ArgNamed("output|o", "Filename of generated object file")
@(ArgExistence.optional)
@(ArgConfig.optional)
string outputFilename = "tlangout.c";
@ArgNamed("entrypointTest|et", "Whether or not to emit entrypoint testing code")
@(ArgExistence.optional)
@(ArgConfig.optional)
bool entrypointTestEmit = true; // TODO: Change this later to `false` of course
@ArgNamed("library-link|ll", "Paths to any object files to ,ink in during the linking phase")
@(ArgConfig.optional)
@(ArgConfig.aggregate)
string[] bruh;
}
void EmitBaseInit(Compiler compiler)
@ -90,6 +97,14 @@ mixin template EmitBase()
}
}
/**
* Base requirements for TypeChecker+
*/
mixin template TypeCheckerBase()
{
}
/**
* Compile the given source file from start to finish
*/