diff options
author | Himbeer <himbeer@disroot.org> | 2024-09-17 18:24:29 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-09-17 19:30:36 +0200 |
commit | 7ed1a6eebb852667f0a4a67e80a09ddecafb9734 (patch) | |
tree | 439e672a416429c9e63c06a25cb9ca38a6bddfa4 /include/parse.h | |
parent | def65693e44f0d3a3ba5ef2eb215b2807e2d449c (diff) |
Implement parsing imports
Diffstat (limited to 'include/parse.h')
-rw-r--r-- | include/parse.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/include/parse.h b/include/parse.h index d3cee83..8cc4985 100644 --- a/include/parse.h +++ b/include/parse.h @@ -49,6 +49,7 @@ struct ast_const_global { struct ast_path { const char **segments; + int len, cap; }; struct ast_import { @@ -71,14 +72,11 @@ struct ast_toplevel { } decl; }; -struct ast_subunit { - struct ast_import *imports; - struct ast_toplevel tops[]; -}; - struct ast_unit { - struct ast_subunit *root; - struct ast_subunit imports[]; + struct ast_import *imports; + struct ast_toplevel *tops; + int impsz, implen; + int topsz, toplen; }; void parse(struct lexer *lexer, struct ast_unit *ast); |