#ifndef ORYX_ANALYZER_H #define ORYX_ANALYZER_H #include #include #include #include "alloc.h" #include "lexer.h" #include "parser.h" #include "symtab.h" #include "types.h" /* The different base types */ enum { /* Currently in the process of being typechecked. Useful for detecting cyclic definitions. */ TYPE_CHECKING, TYPE_NUM, TYPE_FN, _TYPE_LAST_ENT, }; static_assert(_TYPE_LAST_ENT - 1 <= UINT8_MAX, "Too many AST tokens to fix in uint8_t"); typedef struct { idx_t up, i; symtab_t *map; } scope_t; type_t **analyzeprog(ast_t, aux_t, lexemes_t, arena_t *, scope_t **, mpq_t **) __attribute__((returns_nonnull, nonnull)); #endif /* !ORYX_ANALYZER_H */