Minor refactor and basic library

This commit is contained in:
gingerBill
2016-08-05 15:17:23 +01:00
parent 2aaef48c5c
commit 4a303b5c3e
18 changed files with 708 additions and 608 deletions

View File

@@ -58,6 +58,7 @@ struct AstScope {
};
struct Parser {
String init_fullpath;
gbArray(AstFile) files;
gbArray(String) imports;
isize import_index;
@@ -2104,6 +2105,7 @@ ParseFileError parse_files(Parser *p, char *init_filename) {
char *fullpath_str = gb_path_get_full_name(gb_heap_allocator(), init_filename);
String init_fullpath = make_string(fullpath_str);
gb_array_append(p->imports, init_fullpath);
p->init_fullpath = init_fullpath;
gb_for_array(i, p->imports) {
String import_path = p->imports[i];