New concept of AST_MODULE, Ast_File and Ast_Module are now both scopes.
Concept of loading and importing.
This commit is contained in:
17
compiler.h
17
compiler.h
@@ -167,21 +167,7 @@ struct Ast_Scope;
|
||||
struct Ast_Decl;
|
||||
struct Ast_File_Namespace;
|
||||
struct Ast_File;
|
||||
struct Ast_Module{
|
||||
Intern_String name;
|
||||
Array<Ast_File *> files;
|
||||
};
|
||||
|
||||
struct Ast_File{
|
||||
Intern_String filename;
|
||||
Ast_Module *module;
|
||||
|
||||
B32 global_implicit_load;
|
||||
String filecontent;
|
||||
Intern_String name;
|
||||
Ast_Scope *scope;
|
||||
};
|
||||
|
||||
struct Ast_Module;
|
||||
struct Parse_Ctx:Lexer{
|
||||
Allocator *perm; // Stores: AST, tokens, interns
|
||||
Allocator *heap;
|
||||
@@ -190,7 +176,6 @@ struct Parse_Ctx:Lexer{
|
||||
Map type_map;
|
||||
|
||||
Array<Ast_Module *> modules;
|
||||
Array<Ast_File_Namespace *> packages;
|
||||
Ast_Scope *currently_parsed_scope;
|
||||
Ast_File *currently_parsed_file;
|
||||
Array<Ast_Decl *> ordered_decls;
|
||||
|
||||
Reference in New Issue
Block a user