Support one hardcoded import
This commit is contained in:
@ -1,12 +0,0 @@
|
||||
DEFINITION MODULE Common;
|
||||
|
||||
TYPE
|
||||
ShortString = ARRAY[1..256] OF CHAR;
|
||||
Identifier = ARRAY[1..256] OF CHAR;
|
||||
PIdentifier = POINTER TO Identifier;
|
||||
TextLocation = RECORD
|
||||
line: CARDINAL;
|
||||
column: CARDINAL
|
||||
END;
|
||||
|
||||
END Common.
|
@ -1,3 +1,12 @@
|
||||
module;
|
||||
|
||||
type
|
||||
ShortString = [256]Char;
|
||||
Identifier = [256]Char;
|
||||
PIdentifier = ^Identifier;
|
||||
TextLocation* = record
|
||||
line: Word;
|
||||
column: Word
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user