Final touches

This commit is contained in:
Dominic Höglinger 2026-04-24 20:38:53 +02:00
parent 08e5dd8ef5
commit 326cf57870
4 changed files with 21 additions and 4 deletions

View File

@ -0,0 +1,7 @@
namespace XNeedle.Parser.Elements
{
public class NullPart : Part
{
public override void Operate(Context ctx) { }
}
}

View File

@ -15,13 +15,13 @@ namespace XNeedle
public class Options public class Options
{ {
[Value(0, MetaName = "xn", Required = true, HelpText = "XN transformation definition")] [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)] [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)] [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.")] [Option('v', "verbose", Required = false, HelpText = "Set output to verbose messages.")]
public bool Verbose { get; set; } public bool Verbose { get; set; }

View File

@ -21,7 +21,6 @@ namespace XNeedle.Transformation
} }
var bodyctx = bangop.Execute(ctx, Arguments); var bodyctx = bangop.Execute(ctx, Arguments);
Console.WriteLine($"Operate Bang: {Name}, {string.Join(",", Arguments)}");
foreach (var b in Body) foreach (var b in Body)
{ {
b.Operate(bodyctx); b.Operate(bodyctx);

View File

@ -1,5 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>xn</AssemblyName>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework> <TargetFramework>net10.0</TargetFramework>