mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
Add type imports and exports to parser
This commit is contained in:
@@ -13,3 +13,23 @@ public record NamespaceImport : Import
|
||||
|
||||
public override string ToString() => $"{base.ToString()} {Uri} as {Name}";
|
||||
}
|
||||
|
||||
public record TypeImport : Import
|
||||
{
|
||||
public TypeImport(string namespacePrefix, string name) : base("type")
|
||||
{
|
||||
NamespacePrefix = namespacePrefix;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public string NamespacePrefix { get; init; }
|
||||
public string Name { get; init; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (NamespacePrefix is null)
|
||||
return $"{base.ToString()} {Name}";
|
||||
else
|
||||
return $"{base.ToString()} {NamespacePrefix}:{Name}";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user