* Add support for 'array of _Enum_Type_'  types for registered methods.


This will also add support for 'array of Boolean' type, as Boolean considered as enum in pascal script.

* Fix wrong compilation error pos if happened on the last line after PreProcessor.AdjustMessages (#220)

Fix for #220
We should update Res.Row / Res.Col if Pos is
Item.LineOffset[Item.LineOffsetCount - 1] <= Pos < Item.EndPos
This commit is contained in:
Rey 2020-09-30 14:51:47 +03:00 committed by GitHub
parent 621e77e550
commit 63dc2a78e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,7 +280,6 @@ begin
Res.Pos := Pos;
Res.Col := 1;
Res.Row := 1;
LinePos := 0;
for j := 0 to Item.LineOffsetCount -1 do
begin
if Pos >= Item.LineOffset[j] then
@ -288,10 +287,10 @@ begin
linepos := Item.LineOffset[j];
end else
begin
Res.Row := j; // j -1, but line counting starts at 1
Res.Col := pos - linepos + 1;
Break;
end;
Res.Row := j + 1; // line counting starts at 1
Res.Col := pos - linepos + 1;
end;
Result := True;
exit;