diff options
| author | hachem <im@hachem.wtf> | 2026-08-30 03:38:46 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-30 03:38:46 +0200 |
| commit | 2e7cab34d22a0174909030942671e95d5a3c769f (patch) | |
| tree | fe2d5a54f20b7908936c8dc9151023e440168d46 /src/parser/ast.h | |
| parent | 5767110816ca9452ef77d15245d1a747bfdd896b (diff) | |
add: top level data declarations
Diffstat (limited to 'src/parser/ast.h')
| -rw-r--r-- | src/parser/ast.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/parser/ast.h b/src/parser/ast.h index 7079305..30dd1e7 100644 --- a/src/parser/ast.h +++ b/src/parser/ast.h @@ -10,13 +10,24 @@ struct ConstDecl struct Token value; }; +struct DataDecl +{ + struct Token name; + struct Token value; +}; + struct Program { struct ConstDecl* consts; size_t const_count; size_t const_capacity; + + struct DataDecl* data_decls; + size_t data_count; + size_t data_capacity; }; struct Program create_program(void); void free_program(struct Program* program); void add_const(struct Program* program, struct ConstDecl decl); +void add_data(struct Program* program, struct DataDecl decl); |
