mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 10:39:09 +02:00
codetools: fixed parsing empty implementation section
git-svn-id: trunk@23673 -
This commit is contained in:
parent
c368ff5ba7
commit
885e19158d
@ -3043,7 +3043,11 @@ begin
|
|||||||
'R': if CompareIdentifiers(p,'PROGRAM')=0 then exit(DoSourceTypeToken);
|
'R': if CompareIdentifiers(p,'PROGRAM')=0 then exit(DoSourceTypeToken);
|
||||||
'A': if CompareIdentifiers(p,'PACKAGE')=0 then exit(DoSourceTypeToken);
|
'A': if CompareIdentifiers(p,'PACKAGE')=0 then exit(DoSourceTypeToken);
|
||||||
end;
|
end;
|
||||||
'U': if CompareIdentifiers(p,'UNIT')=0 then exit(DoSourceTypeToken);
|
'U':
|
||||||
|
case UpChars[p[1]] of
|
||||||
|
'N': if CompareIdentifiers(p,'UNIT')=0 then exit(DoSourceTypeToken);
|
||||||
|
'S': if CompareIdentifiers(p,'USES')=0 then exit(DoUsesToken);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
Result:=false;
|
Result:=false;
|
||||||
end;
|
end;
|
||||||
@ -3076,9 +3080,6 @@ begin
|
|||||||
if ord(ScannedRange)>=ord(lsrInterfaceStart) then exit(false);
|
if ord(ScannedRange)>=ord(lsrInterfaceStart) then exit(false);
|
||||||
ScannedRange:=lsrInterfaceStart;
|
ScannedRange:=lsrInterfaceStart;
|
||||||
Result:=true;
|
Result:=true;
|
||||||
if ScannedRange=ScanTill then exit;
|
|
||||||
ReadNextToken;
|
|
||||||
if IsUsesToken then Result:=DoUsesToken;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLinkScanner.DoFinalizationToken: boolean;
|
function TLinkScanner.DoFinalizationToken: boolean;
|
||||||
@ -3101,7 +3102,9 @@ begin
|
|||||||
if ord(ScannedRange)<=ord(lsrInterfaceStart) then
|
if ord(ScannedRange)<=ord(lsrInterfaceStart) then
|
||||||
ScannedRange:=lsrMainUsesSectionStart
|
ScannedRange:=lsrMainUsesSectionStart
|
||||||
else if ScannedRange=lsrImplementationStart then
|
else if ScannedRange=lsrImplementationStart then
|
||||||
ScannedRange:=lsrImplementationUsesSectionStart;
|
ScannedRange:=lsrImplementationUsesSectionStart
|
||||||
|
else
|
||||||
|
exit(false);
|
||||||
repeat
|
repeat
|
||||||
// read unit name
|
// read unit name
|
||||||
ReadNextToken;
|
ReadNextToken;
|
||||||
@ -3140,9 +3143,6 @@ begin
|
|||||||
if ord(ScannedRange)>=ord(lsrImplementationStart) then exit(false);
|
if ord(ScannedRange)>=ord(lsrImplementationStart) then exit(false);
|
||||||
ScannedRange:=lsrImplementationStart;
|
ScannedRange:=lsrImplementationStart;
|
||||||
Result:=true;
|
Result:=true;
|
||||||
if ScannedRange=ScanTill then exit;
|
|
||||||
ReadNextToken;
|
|
||||||
if IsUsesToken then Result:=DoUsesToken;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLinkScanner.SkipTillEndifElse(SkippingUntil: TLSSkippingDirective);
|
procedure TLinkScanner.SkipTillEndifElse(SkippingUntil: TLSSkippingDirective);
|
||||||
|
Loading…
Reference in New Issue
Block a user