mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
Move syntax models to own folder
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using Humanizer;
|
using Humanizer;
|
||||||
|
using Microsoft.Iris.Asm.Models;
|
||||||
using Microsoft.Iris.Markup;
|
using Microsoft.Iris.Markup;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Sprache;
|
using Microsoft.Iris.Asm.Models;
|
||||||
|
using Sprache;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Microsoft.Iris.Asm.Models;
|
||||||
|
|
||||||
|
public record NamespaceImport(string Uri, string Name) : IImport
|
||||||
|
{
|
||||||
|
public override string ToString() => $".import-ns {Uri} as {Name}";
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Microsoft.Iris.Asm;
|
namespace Microsoft.Iris.Asm.Models;
|
||||||
|
|
||||||
public interface IBodyItem { }
|
public interface IBodyItem { }
|
||||||
public interface IImport { }
|
public interface IImport { }
|
||||||
@@ -20,16 +20,11 @@ public record Label(string Name) : IBodyItem
|
|||||||
public override string ToString() => $"{Name}:";
|
public override string ToString() => $"{Name}:";
|
||||||
}
|
}
|
||||||
|
|
||||||
public record Operand(object Value, string? Content = null)
|
public record Operand(object Value, string Content = null)
|
||||||
{
|
{
|
||||||
public override string ToString() => Content ?? Value.ToString();
|
public override string ToString() => Content ?? Value.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public record NamespaceImport(string Uri, string Name) : IImport
|
|
||||||
{
|
|
||||||
public override string ToString() => $".import-ns {Uri} as {Name}";
|
|
||||||
}
|
|
||||||
|
|
||||||
public record Program(IEnumerable<IImport> Imports, IEnumerable<IBodyItem> Body)
|
public record Program(IEnumerable<IImport> Imports, IEnumerable<IBodyItem> Body)
|
||||||
{
|
{
|
||||||
public override string ToString() => string.Join("\r\n", Imports.Select(i => i.ToString()).Concat(Body.Select(b => b.ToString())));
|
public override string ToString() => string.Join("\r\n", Imports.Select(i => i.ToString()).Concat(Body.Select(b => b.ToString())));
|
||||||
Reference in New Issue
Block a user