Remove interfaces
This commit is contained in:
@@ -5,7 +5,6 @@ namespace NubLang.Modules;
|
||||
public class Module
|
||||
{
|
||||
private readonly List<ModuleStruct> _structs = [];
|
||||
private readonly List<ModuleInterface> _interfaces = [];
|
||||
private readonly List<ModuleFunction> _functions = [];
|
||||
|
||||
public void RegisterStruct(bool exported, string name, List<ModuleStructField> fields, List<ModuleStructFunction> functions)
|
||||
@@ -13,11 +12,6 @@ public class Module
|
||||
_structs.Add(new ModuleStruct(exported, name, fields, functions));
|
||||
}
|
||||
|
||||
public void RegisterInterface(bool exported, string name, List<ModuleInterfaceFunction> functions)
|
||||
{
|
||||
_interfaces.Add(new ModuleInterface(exported, name, functions));
|
||||
}
|
||||
|
||||
public void RegisterFunction(bool exported, string name, string? externSymbol, List<ModuleFunctionParameter> parameters, TypeSyntax returnType)
|
||||
{
|
||||
_functions.Add(new ModuleFunction(exported, name, externSymbol, parameters, returnType));
|
||||
@@ -28,11 +22,6 @@ public class Module
|
||||
return _structs.Where(x => x.Exported || includePrivate).ToList();
|
||||
}
|
||||
|
||||
public List<ModuleInterface> InterfaceTypes(bool includePrivate)
|
||||
{
|
||||
return _interfaces.Where(x => x.Exported || includePrivate).ToList();
|
||||
}
|
||||
|
||||
public List<ModuleFunction> Functions(bool includePrivate)
|
||||
{
|
||||
return _functions.Where(x => x.Exported || includePrivate).ToList();
|
||||
@@ -47,12 +36,6 @@ public record ModuleStructFunction(string Name, List<ModuleStructFunctionParamet
|
||||
|
||||
public record ModuleStruct(bool Exported, string Name, List<ModuleStructField> Fields, List<ModuleStructFunction> Functions);
|
||||
|
||||
public record ModuleInterfaceFunctionParameter(string Name, TypeSyntax Type);
|
||||
|
||||
public record ModuleInterfaceFunction(string Name, List<ModuleInterfaceFunctionParameter> Parameters, TypeSyntax ReturnType);
|
||||
|
||||
public record ModuleInterface(bool Exported, string Name, List<ModuleInterfaceFunction> Functions);
|
||||
|
||||
public record ModuleFunctionParameter(string Name, TypeSyntax Type);
|
||||
|
||||
public record ModuleFunction(bool Exported, string Name, string? ExternSymbol, List<ModuleFunctionParameter> Parameters, TypeSyntax ReturnType);
|
||||
Reference in New Issue
Block a user