summaryrefslogtreecommitdiff
path: root/Orchestrator/Program.cs
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-17 20:49:22 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-17 20:49:22 +1000
commit18868128e18d38b706e7df14e8e683e1a9739c17 (patch)
tree6f0e0e5eee646f10cbad9c0c89c24d330bc58cc6 /Orchestrator/Program.cs
parentd87ab8af4c86a3fc6ee237444e372d87e536e3ef (diff)
chore: Initial commit
Diffstat (limited to 'Orchestrator/Program.cs')
-rw-r--r--Orchestrator/Program.cs74
1 files changed, 0 insertions, 74 deletions
diff --git a/Orchestrator/Program.cs b/Orchestrator/Program.cs
deleted file mode 100644
index c5d7538..0000000
--- a/Orchestrator/Program.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-namespace Orchestrator;
-
-using CommandLine;
-using Q1.Assembler;
-using Q1.Compiler;
-using Q1.Emulator;
-
-class Program
-{
- static void Main(string[] args)
- {
- Parser p = new(with =>
- {
- 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");
-
- if (!options.NoCompile)
- Q1.Compiler.Program.Main(
- new CompilerOptions
- {
- CommentCompilationMode = options.CommentCompilationMode,
- InputFile = options.InputFile,
- OutputFile = compiledFile,
- Verbose = options.Verbose
- });
-
- if (!options.NoAssemble)
- Q1.Assembler.Program.Main(
- new AssemblerOptions
- {
- InputFile = compiledFile,
- OutputFile = assembledFile
- });
-
- if (!options.NoEmulate)
- Q1.Emulator.Program.Main(
- new EmulatorOptions
- {
- InputFile = assembledFile,
- });
- }
-}
-
-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("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;
-
- [Option('v', "verbose", HelpText = "Enable verbose output")]
- public bool Verbose { get; set; } = false;
-} \ No newline at end of file