wip: working on generator

- Feat: add break handler
- Feat: add class handler
- Feat: add format string handler
- Feat: add loop handler
This commit is contained in:
samsonium
2026-11-04 20:04:33 +03:00
parent 7fe3fe3ff3
commit b278e8bb74
4 changed files with 192 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#include <compiler/internals/gen.h>
#include <stdbool.h>
// Format string
bool gen_fmtstr(fzl_gen_t *gen, fzl_node_t *node)
{
if (!gen || !node)
return false;
for (size_t i = 0; i < node->list.entry_count; i++)
if (!gen_common(gen, node->list.entries[i]))
return false;
gen_op(gen, FZL_OPCODE_BUILD_STR);
gen_word(gen, node->list.entry_count);
return true;
}