Begin moving foreign import import paths to be evaluated in the semantic phase rather than parsing.

This commit is contained in:
gingerBill
2024-05-27 23:51:43 +01:00
parent 74ac2667e7
commit 38fffff06a
4 changed files with 69 additions and 39 deletions

View File

@@ -278,7 +278,7 @@ Token ast_end_token(Ast *node) {
case Ast_ImportDecl: return node->ImportDecl.relpath;
case Ast_ForeignImportDecl:
if (node->ForeignImportDecl.filepaths.count > 0) {
return node->ForeignImportDecl.filepaths[node->ForeignImportDecl.filepaths.count-1];
return ast_end_token(node->ForeignImportDecl.filepaths[node->ForeignImportDecl.filepaths.count-1]);
}
if (node->ForeignImportDecl.library_name.kind != Token_Invalid) {
return node->ForeignImportDecl.library_name;