feat: implement functions

This commit is contained in:
samsonium
2026-10-15 02:23:43 +03:00
parent cc3087296f
commit 2c206822ca
15 changed files with 391 additions and 36 deletions
+3 -1
View File
@@ -74,7 +74,9 @@ fzl_token_t *parse_name(fzl_reader_t *reader)
size_t line = reader->line_n;
size_t pos = start - reader->line_start;
if (strcmp(value, "if") == 0)
if (strcmp(value, "return") == 0)
tok = fzl_mktoken(FZL_TOKTYPE_RETURN, line, pos, value, size);
else if (strcmp(value, "if") == 0)
tok = fzl_mktoken(FZL_TOKTYPE_IF, line, pos, value, size);
else if (strcmp(value, "else") == 0)
tok = fzl_mktoken(FZL_TOKTYPE_ELSE, line, pos, value, size);