wip: working on generator

- Feat: add extern type resolving to type slot
- Feat: add extern block handling
- Feat: add extern function handling
This commit is contained in:
samsonium
2026-11-04 18:30:02 +03:00
parent f2b88e448e
commit 731b662cfc
4 changed files with 166 additions and 0 deletions
+3
View File
@@ -1,6 +1,7 @@
#ifndef INTERNALS_GEN_H
#define INTERNALS_GEN_H
#include <common/fzl_extern.h>
#include <common/fzl_opcodes.h>
#include <common/fzl_types.h>
#include <compiler/fzl_gen.h>
@@ -10,11 +11,13 @@
#include <compiler/utils/fzl_symtable.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
extern char *null_name;
bool gen_resolve_name(fzl_gen_t *gen, char *name, fzl_sym_t *sym);
bool gen_resolve_type(fzl_gen_t *gen, fzl_token_t *tok, fzl_type_t *t, char *c);
ssize_t gen_resolve_extern_type(fzl_gen_t *gen, char *name);
bool gen_is_types_compatible(fzl_type_t t1, fzl_type_t t2, char *c1, char *c2);
size_t gen_add_const(fzl_gen_t *gen, fzl_const_t c);
void gen_op(fzl_gen_t *gen, fzl_opcode_t opcode);