Compiling with Type_Info

This commit is contained in:
Krzosa Karol
2022-06-18 23:32:34 +02:00
parent c85fa02750
commit 071a8de6a4
5 changed files with 33 additions and 99 deletions

21
ast.cpp
View File

@@ -193,13 +193,6 @@ How does current declaration order resolver works:
*/
enum Ast_Decl_State{
DECL_NOT_RESOLVED,
DECL_RESOLVED,
DECL_RESOLVED_TYPE,
DECL_RESOLVING,
};
struct Ast_Scope: Ast{
Intern_String name; // for debugging
Array<Ast_Scope *> implicit_imports;
@@ -210,7 +203,14 @@ struct Ast_Scope: Ast{
Ast_Module *module;
};
enum Ast_Module_State{
MODULE_REGISTERED,
MODULE_PARSED,
MODULE_RESOLVED,
};
struct Ast_Module: Ast_Scope{
Ast_Module_State state;
Array<Ast_File *> all_loaded_files;
};
@@ -219,6 +219,13 @@ struct Ast_File: Ast_Scope{
String filecontent;
};
enum Ast_Decl_State{
DECL_NOT_RESOLVED,
DECL_RESOLVED,
DECL_RESOLVED_TYPE,
DECL_RESOLVING,
};
struct Ast_Decl: Ast{
Ast_Decl_State state;
Intern_String name;