mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-26 07:25:00 -07:00
Minimize TokenPos size by using i32 for line/column/offset and file_id instead of String
To make `i32` safe, the parser limits the file size of odin files to a maximum of 2GiB (which will be good enough for the vast vast majority of cases)
This commit is contained in:
+2
-1
@@ -42,6 +42,7 @@ enum ParseFileError {
|
||||
ParseFile_NotFound,
|
||||
ParseFile_InvalidToken,
|
||||
ParseFile_GeneralError,
|
||||
ParseFile_FileTooLarge,
|
||||
|
||||
ParseFile_Count,
|
||||
};
|
||||
@@ -74,7 +75,7 @@ struct ImportedFile {
|
||||
};
|
||||
|
||||
struct AstFile {
|
||||
isize id;
|
||||
i32 id;
|
||||
AstPackage * pkg;
|
||||
Scope * scope;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user