diff options
| author | gingerBill <bill@gingerbill.org> | 2020-10-16 15:32:09 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-10-16 15:32:09 +0100 |
| commit | b1bdd95f19f5e472200954dd7c312a3fd48ae84d (patch) | |
| tree | 86121d262414779aa57bf83defed6e376931c786 /src/parser.hpp | |
| parent | 063c0548b0905959d80dfac6a9a8e51c15e8d8c2 (diff) | |
Begin work on making packages import assembly sort files (.S)
Diffstat (limited to 'src/parser.hpp')
| -rw-r--r-- | src/parser.hpp | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/src/parser.hpp b/src/parser.hpp index 9e20ffc1b..ff47d1887 100644 --- a/src/parser.hpp +++ b/src/parser.hpp @@ -121,14 +121,28 @@ struct AstFile { struct LLVMOpaqueMetadata *llvm_metadata_scope; }; +enum AstForeignFileKind { + AstForeignFile_Invalid, + + AstForeignFile_S, // Source, + + AstForeignFile_COUNT +}; + +struct AstForeignFile { + AstForeignFileKind kind; + String source; +}; + struct AstPackage { - PackageKind kind; - isize id; - String name; - String fullpath; - Array<AstFile *> files; - bool is_single_file; + PackageKind kind; + isize id; + String name; + String fullpath; + Array<AstFile *> files; + Array<AstForeignFile> foreign_files; + bool is_single_file; // NOTE(bill): Created/set in checker Scope * scope; @@ -158,6 +172,12 @@ struct ParserWorkerData { ImportedFile imported_file; }; +struct ForeignFileWorkerData { + Parser *parser; + ImportedFile imported_file; + AstForeignFileKind foreign_kind; +}; + |