wip: working on analyzer
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#ifndef FZL_ANALYZER_H
|
||||
#define FZL_ANALYZER_H
|
||||
|
||||
#include <compiler/fzl_parser.h>
|
||||
#include <stddef.h>
|
||||
|
||||
// Analyzer descriptor
|
||||
typedef struct
|
||||
{
|
||||
char *warnings[256];
|
||||
size_t warnings_top;
|
||||
|
||||
char *errors[256];
|
||||
size_t errors_top;
|
||||
|
||||
fzl_node_t *root;
|
||||
} fzl_analyzer_t;
|
||||
|
||||
// Allocate analyzer
|
||||
fzl_analyzer_t *fzl_mkanalyzer(fzl_node_t *node);
|
||||
|
||||
// Analyze AST
|
||||
void fzl_analyze(fzl_analyzer_t *analyzer);
|
||||
|
||||
// Free analyzer
|
||||
void fzl_freeanalyzer(fzl_analyzer_t *analyzer);
|
||||
|
||||
#endif // FZL_ANALYZER_H
|
||||
Reference in New Issue
Block a user