From b3206320c79308f82b1b266b7f7dd582d35a7974 Mon Sep 17 00:00:00 2001 From: nub31 Date: Thu, 16 Oct 2025 23:06:00 +0200 Subject: [PATCH] ... --- compiler/NubLang.CLI/Options.cs | 7 ------ compiler/NubLang.CLI/Program.cs | 38 +-------------------------------- 2 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 compiler/NubLang.CLI/Options.cs diff --git a/compiler/NubLang.CLI/Options.cs b/compiler/NubLang.CLI/Options.cs deleted file mode 100644 index 31f8c07..0000000 --- a/compiler/NubLang.CLI/Options.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace NubLang.CLI; - -public class Options -{ - public string? OutputPath { get; set; } - public List Files { get; } = []; -} \ No newline at end of file diff --git a/compiler/NubLang.CLI/Program.cs b/compiler/NubLang.CLI/Program.cs index 9a478de..94ca549 100644 --- a/compiler/NubLang.CLI/Program.cs +++ b/compiler/NubLang.CLI/Program.cs @@ -1,50 +1,14 @@ using System.Diagnostics; using NubLang.Ast; -using NubLang.CLI; using NubLang.Diagnostics; using NubLang.Generation; using NubLang.Modules; using NubLang.Syntax; -var options = new Options(); - -for (var i = 0; i < args.Length; i++) -{ - var arg = args[i]; - switch (arg) - { - case "-o": - { - ++i; - if (i >= args.Length) - { - return 1; - } - - options.OutputPath = args[i]; - break; - } - default: - { - options.Files.Add(arg); - break; - } - } -} - -foreach (var file in options.Files) -{ - if (!File.Exists(file)) - { - Console.Error.WriteLine($"File '{file}' does not exist"); - return 1; - } -} - var diagnostics = new List(); var syntaxTrees = new List(); -foreach (var file in options.Files) +foreach (var file in args) { var tokenizer = new Tokenizer(file, File.ReadAllText(file)); tokenizer.Tokenize();