aboutsummaryrefslogtreecommitdiff
path: root/src/parser.hpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-05-27 21:22:25 +0100
committergingerBill <bill@gingerbill.org>2018-05-27 21:22:25 +0100
commit5c52ffe24e86241de2057dbf62c3012432aa1db0 (patch)
treebfe1167eab0570aae49e94380afe45792b6b9de1 /src/parser.hpp
parenta5763d6feec5985c7fcf5e6bee1cd0a1830be685 (diff)
Reorganize `runtime` package
Diffstat (limited to 'src/parser.hpp')
-rw-r--r--src/parser.hpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/parser.hpp b/src/parser.hpp
index 3f8b13cb4..a2c10c81a 100644
--- a/src/parser.hpp
+++ b/src/parser.hpp
@@ -27,7 +27,7 @@ struct CommentGroup {
enum PackageKind {
Package_Normal,
- Package_Builtin,
+ Package_Runtime,
Package_Init,
};
@@ -85,11 +85,11 @@ struct AstFile {
struct AstPackage {
- isize id;
- PackageKind kind;
- String name;
- String fullpath;
- Map<AstFile *> files; // Key: String (names)
+ isize id;
+ PackageKind kind;
+ String name;
+ String fullpath;
+ Array<AstFile *> files;
Scope * scope; // NOTE(bill): Created in checker
DeclInfo *decl_info; // NOTE(bill): Created in checker
@@ -356,6 +356,12 @@ AST_NODE_KIND(_DeclBegin, "", struct {}) \
bool is_mutable; \
bool been_handled; \
}) \
+ AST_NODE_KIND(PackageDecl, "package declaration", struct { \
+ Token token; \
+ Token name; \
+ CommentGroup docs; \
+ CommentGroup comment; \
+ }) \
AST_NODE_KIND(ImportDecl, "import declaration", struct { \
AstPackage *package; \
Token token; \