(SOC) Storage Only Commit - Sat 22 Jun 14:54:31 CST 2024

This commit is contained in:
William
2024-06-22 14:54:31 +08:00
parent 95a49ebefa
commit 2eb66dbc8d
18 changed files with 414 additions and 378 deletions

34
function.h Normal file
View File

@@ -0,0 +1,34 @@
#ifndef FUNCTION_H
# define FUNCTION_H
# include <Compound/string.h>
typedef Var Type;
typedef struct {
attr(registered 1) Type type;
attr(nullity false) String identity;
attr(alignwith 1)
attr(optional true) Type value;
} Parameter;
typedef void * Block;
typedef struct {
Type returns;
Array type(Parameter) params;
Var type(Block) body;
} Function;
Status Function_Create(Function *inst, Type returns,
Array type(Parameter) params, Var type(Block) body);
Status Function_CopyOf(Function *inst, Function *other);
Status Function_Delete(Function *inst);
Status Function_Literalise(Function *inst, String *buff);
Status Function_Overwrite(Function *inst, Function *other);
bool Function_Equal(Function *inst, Function *other);
bool FunctionUtils_IsVariadic(Function *inst);
#endif /* FUNCTION_H */