defer and struct hooks
This commit is contained in:
@@ -32,7 +32,7 @@ public record ModuleStructField(string Name, TypeSyntax Type, bool HasDefaultVal
|
||||
|
||||
public record ModuleStructFunctionParameter(string Name, TypeSyntax Type);
|
||||
|
||||
public record ModuleStructFunction(string Name, List<ModuleStructFunctionParameter> Parameters, TypeSyntax ReturnType);
|
||||
public record ModuleStructFunction(string Name, string? Hook, List<ModuleStructFunctionParameter> Parameters, TypeSyntax ReturnType);
|
||||
|
||||
public record ModuleStruct(bool Exported, string Name, List<ModuleStructField> Fields, List<ModuleStructFunction> Functions);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ModuleRepository
|
||||
foreach (var function in structDef.Functions)
|
||||
{
|
||||
var parameters = function.Signature.Parameters.Select(x => new ModuleStructFunctionParameter(x.Name, x.Type)).ToList();
|
||||
functions.AddRange(new ModuleStructFunction(function.Name, parameters, function.Signature.ReturnType));
|
||||
functions.AddRange(new ModuleStructFunction(function.Name, function.Hook, parameters, function.Signature.ReturnType));
|
||||
}
|
||||
|
||||
module.RegisterStruct(structDef.Exported, structDef.Name, fields, functions);
|
||||
|
||||
Reference in New Issue
Block a user