namespace NubLang.TypeChecking.Node;

public abstract record DefinitionNode(string Module, string Name) : Node;

public record FuncParameterNode(string Name, NubType Type) : Node;

public record FuncSignatureNode(List<FuncParameterNode> Parameters, NubType ReturnType) : Node;

public record FuncNode(string Module, string Name, string? ExternSymbol, FuncSignatureNode Signature, BlockNode? Body) : DefinitionNode(Module, Name);

public record StructFieldNode(string Name, NubType Type, ExpressionNode? Value) : Node;

public record StructFuncNode(string Name, string? Hook, FuncSignatureNode Signature, BlockNode Body) : Node;

public record StructNode(string Module, string Name, List<StructFieldNode> Fields, List<StructFuncNode> Functions) : DefinitionNode(Module, Name);

public record GlobalVariableNode(string Module, string Name, ExpressionNode Value) : DefinitionNode(Module, Name);