feat: implement objects and classes

This commit is contained in:
samsonium
2026-10-16 18:11:28 +03:00
parent 683dd08181
commit bc5d887ec4
22 changed files with 848 additions and 116 deletions
+8 -1
View File
@@ -10,7 +10,8 @@ typedef enum
{
FZL_SYMTABLE_RESULT_OK,
FZL_SYMTABLE_RESULT_ERR,
FZL_SYMTABLE_RESULT_EXISTS
FZL_SYMTABLE_RESULT_EXISTS,
FZL_SYMTABLE_RESULT_NOT_OBJECT
} fzl_symtable_res_t;
// Symbols table entry descriptor
@@ -19,6 +20,8 @@ typedef struct
char *name;
fzl_type_t type;
size_t ip;
char *classname;
} fzl_sym_t;
// Symbols table descriptor
@@ -37,6 +40,10 @@ fzl_symtable_t *fzl_mksymt();
fzl_symtable_res_t fzl_symt_put(fzl_symtable_t *symt, char *name,
fzl_type_t type, uint64_t ip);
// Assign class name to object type
fzl_symtable_res_t fzl_symt_setobjclass(fzl_symtable_t *symt, char *name,
char *classname);
// Get entry from specified symtable
bool fzl_symt_get(fzl_symtable_t *symt, char *name, fzl_sym_t *res);