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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user