This commit is contained in:
nub31
2025-07-22 22:44:55 +02:00
parent 6b733b9cdf
commit eb009b6ac0
18 changed files with 200 additions and 274 deletions

View File

@@ -373,7 +373,7 @@ public partial class QBEGenerator
private void EmitStructDefinition(BoundStruct structDef)
{
_writer.WriteLine($"type {CustomTypeName(structDef.Namespace, structDef.Name)} = {{ ");
_writer.WriteLine($"type {CustomTypeName(structDef.Name)} = {{ ");
var types = new Dictionary<string, string>();
@@ -419,7 +419,7 @@ public partial class QBEGenerator
private void EmitTraitVTable(BoundTrait traitDef)
{
_writer.WriteLine($"type {CustomTypeName(traitDef.Namespace, traitDef.Name)} = {{");
_writer.WriteLine($"type {CustomTypeName(traitDef.Name)} = {{");
foreach (var func in traitDef.Functions)
{
@@ -500,7 +500,7 @@ public partial class QBEGenerator
private string LocalFuncName(BoundLocalFunc funcDef)
{
return $"${funcDef.Namespace}_{funcDef.Name}";
return $"${funcDef.Name}";
}
private string ExternFuncName(BoundExternFunc funcDef)
@@ -510,12 +510,12 @@ public partial class QBEGenerator
private string CustomTypeName(NubCustomType customType)
{
return CustomTypeName(customType.Namespace, customType.Name);
return CustomTypeName(customType.Name);
}
private string CustomTypeName(string @namespace, string name)
private string CustomTypeName(string name)
{
return $":{@namespace}_{name}";
return $":{name}";
}
#endregion