mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-03 07:38:30 +02:00
CodeTool: Parse packed array params "procedure Foo(bar: packed array of integer)"
This commit is contained in:
parent
db98b76076
commit
599e06f718
@ -1632,6 +1632,7 @@ function TPascalParserTool.ReadParamType(ExceptionOnError, Extract: boolean;
|
||||
// Examples:
|
||||
// integer
|
||||
// array of integer
|
||||
// packed array of integer
|
||||
// array of const
|
||||
// file
|
||||
// file of integer
|
||||
@ -1640,6 +1641,7 @@ function TPascalParserTool.ReadParamType(ExceptionOnError, Extract: boolean;
|
||||
// univ longint (only macpas)
|
||||
var
|
||||
Copying: boolean;
|
||||
IsPackedType: Boolean;
|
||||
IsArrayType: Boolean;
|
||||
IsFileType: Boolean;
|
||||
NeedIdentifier: boolean;
|
||||
@ -1659,6 +1661,9 @@ begin
|
||||
ReadNextAtom;
|
||||
if CurPos.Flag in AllCommonAtomWords then begin
|
||||
NeedIdentifier:=true;
|
||||
IsPackedType:=UpAtomIs('PACKED');
|
||||
if IsPackedType then
|
||||
Next;
|
||||
IsArrayType:=UpAtomIs('ARRAY');
|
||||
if IsArrayType then begin
|
||||
//DebugLn(['TPascalParserTool.ReadParamType is array ',MainFilename,' ',CleanPosToStr(curPos.StartPos)]);
|
||||
@ -1690,6 +1695,13 @@ begin
|
||||
Result:=true;
|
||||
exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
if IsPackedType then begin
|
||||
if ExceptionOnError then
|
||||
SaveRaiseStringExpectedButAtomFound(20170421195440,'"array"')
|
||||
else
|
||||
exit;
|
||||
end;
|
||||
IsFileType:=UpAtomIs('FILE');
|
||||
if IsFileType then begin
|
||||
|
Loading…
Reference in New Issue
Block a user