Support one hardcoded import

This commit is contained in:
2025-07-10 00:43:17 +02:00
parent 181b19eefe
commit 22c787f0f5
14 changed files with 195 additions and 115 deletions

View File

@@ -3,7 +3,7 @@
obtain one at https://mozilla.org/MPL/2.0/. *)
program;
import dummy;
import Common;
const
SEEK_SET* := 0;
@@ -80,13 +80,9 @@ type
_module,
_import
);
Position* = record
line: Word;
column: Word
end;
Location* = record
first: Position;
last: Position
first: TextLocation;
last: TextLocation
end;
SourceFile* = record
buffer: [1024]Char;
@@ -101,7 +97,7 @@ type
capacity: Word
end;
SourceCode = record
position: Position;
position: TextLocation;
input: Pointer;
empty: proc(Pointer) -> Bool;
@@ -1068,7 +1064,7 @@ begin
fclose(source_file^.handle)
end;
source_code.position := Position(1u, 1u);
source_code.position := TextLocation(1u, 1u);
source_code.input := cast(source_file: Pointer);
source_code.empty := source_file_empty;
source_code.head := source_file_head;