diff options
Diffstat (limited to 'src/parser/ast.h')
| -rw-r--r-- | src/parser/ast.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/parser/ast.h b/src/parser/ast.h new file mode 100644 index 0000000..7079305 --- /dev/null +++ b/src/parser/ast.h @@ -0,0 +1,22 @@ +#pragma once + +#include <stddef.h> + +#include "lexer/lexer.h" + +struct ConstDecl +{ + struct Token name; + struct Token value; +}; + +struct Program +{ + struct ConstDecl* consts; + size_t const_count; + size_t const_capacity; +}; + +struct Program create_program(void); +void free_program(struct Program* program); +void add_const(struct Program* program, struct ConstDecl decl); |
