expose symbols table errors in the header
This commit is contained in:
parent
347512e599
commit
8c62924b63
@ -7,11 +7,11 @@
|
|||||||
constexpr size_t symbol_table_default_cap = 64;
|
constexpr size_t symbol_table_default_cap = 64;
|
||||||
constexpr size_t symbol_table_max_cap = 1 << 16;
|
constexpr size_t symbol_table_max_cap = 1 << 16;
|
||||||
|
|
||||||
error_t *err_symbol_table_invalid_node = &(error_t){
|
error_t *const err_symbol_table_invalid_node = &(error_t){
|
||||||
.message = "Unexpected node id when adding symbol to symbol table"};
|
.message = "Unexpected node id when adding symbol to symbol table"};
|
||||||
error_t *err_symbol_table_max_cap = &(error_t){
|
error_t *const err_symbol_table_max_cap = &(error_t){
|
||||||
.message = "Failed to increase symbol table length, max capacity reached"};
|
.message = "Failed to increase symbol table length, max capacity reached"};
|
||||||
error_t *err_symbol_table_incompatible_symbols =
|
error_t *const err_symbol_table_incompatible_symbols =
|
||||||
&(error_t){.message = "Failed to update symbol with incompatible kind"};
|
&(error_t){.message = "Failed to update symbol with incompatible kind"};
|
||||||
|
|
||||||
error_t *symbol_table_alloc(symbol_table_t **output) {
|
error_t *symbol_table_alloc(symbol_table_t **output) {
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#include "../ast.h"
|
#include "../ast.h"
|
||||||
|
|
||||||
|
extern error_t *const err_symbol_table_invalid_node;
|
||||||
|
extern error_t *const err_symbol_table_max_cap;
|
||||||
|
extern error_t *const err_symbol_table_incompatible_symbols;
|
||||||
|
|
||||||
typedef enum symbol_kind {
|
typedef enum symbol_kind {
|
||||||
SYMBOL_REFERENCE,
|
SYMBOL_REFERENCE,
|
||||||
SYMBOL_LOCAL,
|
SYMBOL_LOCAL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user