wip: working on analyzer

- Feat: add binary math analysis
- Fix: check for function context in block analysis
- Feat: add 'break' analysis
- Fix: few fixes in call analysis
- Feat: add class analysis
- Feat: add construct analysis
- Feat: add declaration analysis
- Feat: add field analysis
- Feat: add function analysis
- Feat: add loop analysis
- Ref: updated utilities and context functions
This commit is contained in:
samsonium
2026-10-27 05:18:36 +03:00
parent d7630dbb6a
commit 25991c6f15
17 changed files with 1094 additions and 30 deletions
+3 -2
View File
@@ -25,14 +25,15 @@ fzl_an_ctx_t *an_nest_ctx(fzl_analyzer_t *analyzer, fzl_an_ctx_type_t type)
// Close context and return parent
fzl_an_ctx_t *an_fin_ctx(fzl_analyzer_t *analyzer)
{
if (!analyzer || !analyzer->ctx)
if (!analyzer || analyzer->ctx == NULL)
return NULL;
fzl_an_ctx_t *current = analyzer->ctx;
fzl_an_ctx_t *parent = current->parent;
analyzer->ctx = parent;
fzl_freesymt(analyzer->symbols[--analyzer->symbols_top]);
free(current);
fzl_freesymt(analyzer->symbols[--analyzer->symbols_top]);
return parent;
}