Set the file's filename and directory in init_ast_file

This commit is contained in:
gingerBill
2022-12-20 14:56:44 +00:00
parent eb0775ad53
commit 44caa96d50
3 changed files with 11 additions and 7 deletions
+5
View File
@@ -99,7 +99,11 @@ struct AstFile {
Scope * scope;
Ast * pkg_decl;
String fullpath;
String filename;
String directory;
Tokenizer tokenizer;
Array<Token> tokens;
isize curr_token_index;
@@ -109,6 +113,7 @@ struct AstFile {
Token package_token;
String package_name;
// >= 0: In Expression
// < 0: In Control Clause
// NOTE(bill): Used to prevent type literals in control clauses