Reorganize runtime package

This commit is contained in:
gingerBill
2018-05-27 21:22:25 +01:00
parent a5763d6fee
commit 5c52ffe24e
21 changed files with 908 additions and 856 deletions
+12 -6
View File
@@ -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; \