From 326cf578704ff36ecd090dd09da7784d6f5134e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominic=20H=C3=B6glinger?= Date: Fri, 24 Apr 2026 20:38:53 +0200 Subject: [PATCH] Final touches --- Parser/Elements/NullPart.cs | 7 +++++++ Program.cs | 6 +++--- Transformation/Bang.cs | 1 - XNeedle.csproj | 11 +++++++++++ 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 Parser/Elements/NullPart.cs diff --git a/Parser/Elements/NullPart.cs b/Parser/Elements/NullPart.cs new file mode 100644 index 0000000..7cbc0c4 --- /dev/null +++ b/Parser/Elements/NullPart.cs @@ -0,0 +1,7 @@ +namespace XNeedle.Parser.Elements +{ + public class NullPart : Part + { + public override void Operate(Context ctx) { } + } +} diff --git a/Program.cs b/Program.cs index 98488c3..ae34d3e 100644 --- a/Program.cs +++ b/Program.cs @@ -15,13 +15,13 @@ namespace XNeedle public class Options { [Value(0, MetaName = "xn", Required = true, HelpText = "XN transformation definition")] - public string XnDefinition { get; set; } + public required string XnDefinition { get; set; } [Option('i', "input", HelpText = "Input XML file", Required = true)] - public string Input { get; set; } + public required string Input { get; set; } [Option('o', "output", HelpText = "Output XML file", Required = true)] - public string Output { get; set; } + public required string Output { get; set; } [Option('v', "verbose", Required = false, HelpText = "Set output to verbose messages.")] public bool Verbose { get; set; } diff --git a/Transformation/Bang.cs b/Transformation/Bang.cs index f52b627..6b933b4 100644 --- a/Transformation/Bang.cs +++ b/Transformation/Bang.cs @@ -21,7 +21,6 @@ namespace XNeedle.Transformation } var bodyctx = bangop.Execute(ctx, Arguments); - Console.WriteLine($"Operate Bang: {Name}, {string.Join(",", Arguments)}"); foreach (var b in Body) { b.Operate(bodyctx); diff --git a/XNeedle.csproj b/XNeedle.csproj index 9dce10b..c9fccaa 100644 --- a/XNeedle.csproj +++ b/XNeedle.csproj @@ -1,5 +1,16 @@  + + Exe + net10.0 + enable + enable + xn + true + true + linux-x64 + + Exe net10.0