...
This commit is contained in:
@@ -102,6 +102,17 @@ public class NubTypeString : NubType
|
||||
public override string ToString() => "string";
|
||||
}
|
||||
|
||||
public class NubTypeChar : NubType
|
||||
{
|
||||
public static readonly NubTypeChar Instance = new();
|
||||
|
||||
private NubTypeChar()
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString() => "char";
|
||||
}
|
||||
|
||||
public class NubTypeStruct : NubType
|
||||
{
|
||||
private static readonly Dictionary<(string Module, string Name), NubTypeStruct> Cache = new();
|
||||
@@ -324,6 +335,10 @@ public class TypeEncoder
|
||||
sb.Append('S');
|
||||
break;
|
||||
|
||||
case NubTypeChar:
|
||||
sb.Append('C');
|
||||
break;
|
||||
|
||||
case NubTypePointer p:
|
||||
sb.Append("P(");
|
||||
EncodeType(sb, p.To);
|
||||
@@ -420,6 +435,7 @@ public class TypeDecoder
|
||||
'U' => DecodeUInt(),
|
||||
'I' => DecodeSInt(),
|
||||
'S' => NubTypeString.Instance,
|
||||
'C' => NubTypeChar.Instance,
|
||||
'P' => DecodePointer(),
|
||||
'F' => DecodeFunc(),
|
||||
'T' => DecodeStruct(),
|
||||
|
||||
Reference in New Issue
Block a user