ref: split parser into separate files

This commit is contained in:
samsonium
2026-10-29 00:08:44 +03:00
parent 62b0030e4a
commit 8c90d54782
27 changed files with 1444 additions and 1307 deletions
+17
View File
@@ -0,0 +1,17 @@
#include <compiler/fzl_parser.h>
#include <compiler/internals/parser.h>
#include <stdio.h>
// `break` keyword parsing
fzl_node_t *pa_break(fzl_parser_t *parser)
{
fzl_token_t *tok = consume(parser);
if (!tok)
{
snprintf(plast_err, sizeof(plast_err), "'%s': EOF",
last_known_tok->filename);
return NULL;
}
return fzl_mknode(FZL_NODETYPE_BREAK, tok);
}