summaryrefslogtreecommitdiff
path: root/Orchestrator
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2025-08-28 21:57:33 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2025-08-28 21:57:33 +1000
commit76cea79a46d42f8f59503d3bb421f0d298da66cb (patch)
treedc4310f667068f97ff6b8488d203b55202bc274a /Orchestrator
parentcf7e621c104cb4aea801392585d2dcc9335bc013 (diff)
implemented standard library
Diffstat (limited to 'Orchestrator')
-rw-r--r--Orchestrator/Program.cs64
1 files changed, 41 insertions, 23 deletions
diff --git a/Orchestrator/Program.cs b/Orchestrator/Program.cs
index a59127b..213f5ee 100644
--- a/Orchestrator/Program.cs
+++ b/Orchestrator/Program.cs
@@ -13,32 +13,38 @@ class Program
{
with.CaseInsensitiveEnumValues = true;
});
-
+
p.ParseArguments<Options>(args).WithParsed(Main);
}
-
+
private static void Main(Options options)
{
string compiledFile = Path.ChangeExtension(options.InputFile, "asm");
string assembledFile = Path.ChangeExtension(options.InputFile, "q1");
-
- Q1.Compiler.Program.Main(new CompilerOptions
- {
- CommentCompilationMode = options.CommentCompilationMode,
- InputFile = options.InputFile,
- OutputFile = compiledFile
- });
-
- Q1.Assembler.Program.Main(new AssemblerOptions
- {
- InputFile = compiledFile,
- OutputFile = assembledFile
- });
-
- Q1.Emulator.Program.Main(new EmulatorOptions
- {
- InputFile = assembledFile,
- });
+
+ if (!options.NoCompile)
+ Q1.Compiler.Program.Main(
+ new CompilerOptions
+ {
+ CommentCompilationMode = options.CommentCompilationMode,
+ InputFile = options.InputFile,
+ OutputFile = compiledFile
+ });
+
+ if (!options.NoAssemble)
+ Q1.Assembler.Program.Main(
+ new AssemblerOptions
+ {
+ InputFile = compiledFile,
+ OutputFile = assembledFile
+ });
+
+ if (!options.NoEmulate)
+ Q1.Emulator.Program.Main(
+ new EmulatorOptions
+ {
+ InputFile = assembledFile,
+ });
}
}
@@ -46,7 +52,19 @@ class Options
{
[Option('i', "input", Required = true, HelpText = "Input file to process.")]
public string InputFile { get; set; }
-
- [Option('c', "comment-compilation", Required = false, HelpText = "Comments to preserve in the compiled result")]
- public CommentCompilationMode CommentCompilationMode { get; set; } = CommentCompilationMode.UserDefined;
+
+ [Option(
+ 'c', "comment-compilation", Required = false,
+ HelpText = "Comments to preserve in the compiled result")]
+ public CommentCompilationMode CommentCompilationMode { get; set; } =
+ CommentCompilationMode.UserDefined;
+
+ [Option("no-compile", HelpText = "Skip compilation")]
+ public bool NoCompile { get; set; } = false;
+
+ [Option("no-assemble", HelpText = "Skip assembling")]
+ public bool NoAssemble { get; set; } = false;
+
+ [Option("no-emulate", HelpText = "Skip emulation")]
+ public bool NoEmulate { get; set; } = false;
} \ No newline at end of file