mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 22:19:12 +02:00
Codetools: Formatting, cleanup.
This commit is contained in:
parent
1268709017
commit
021deb1dee
@ -4145,26 +4145,25 @@ var
|
|||||||
fdfSearchForward in Flags,Params,SearchRangeFlags);
|
fdfSearchForward in Flags,Params,SearchRangeFlags);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure RaiseNotFound;
|
||||||
|
var
|
||||||
|
Identifier: string;
|
||||||
|
begin
|
||||||
|
Identifier:=GetIdentifier(Params.Identifier);
|
||||||
|
if (Identifier='') and (Params.Identifier<>nil)
|
||||||
|
and (Params.Identifier[0]<>#0) then begin
|
||||||
|
Identifier:=Params.Identifier[0];
|
||||||
|
if Identifier='[' then begin
|
||||||
|
Params.IdentifierTool.RaiseException(20170421200103,ctsDefaultPropertyNotFound);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Params.IdentifierTool.RaiseExceptionFmt(20170421200105,ctsIdentifierNotFound,
|
||||||
|
[Identifier]);
|
||||||
|
end;
|
||||||
|
|
||||||
function CheckResult(NewResult, CallOnIdentifierFound: boolean): boolean;
|
function CheckResult(NewResult, CallOnIdentifierFound: boolean): boolean;
|
||||||
// returns: true to stop search
|
// returns: true to stop search
|
||||||
// false if search should continue
|
// false if search should continue
|
||||||
|
|
||||||
procedure RaiseNotFound;
|
|
||||||
var
|
|
||||||
Identifier: string;
|
|
||||||
begin
|
|
||||||
Identifier:=GetIdentifier(Params.Identifier);
|
|
||||||
if (Identifier='') and (Params.Identifier<>nil)
|
|
||||||
and (Params.Identifier[0]<>#0) then begin
|
|
||||||
Identifier:=Params.Identifier[0];
|
|
||||||
if Identifier='[' then begin
|
|
||||||
Params.IdentifierTool.RaiseException(20170421200103,ctsDefaultPropertyNotFound);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
Params.IdentifierTool.RaiseExceptionFmt(20170421200105,ctsIdentifierNotFound,
|
|
||||||
[Identifier]);
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=true;
|
Result:=true;
|
||||||
FindIdentifierInContext:=NewResult and (not (fdfCollect in Flags));
|
FindIdentifierInContext:=NewResult and (not (fdfCollect in Flags));
|
||||||
@ -4996,8 +4995,7 @@ begin
|
|||||||
|
|
||||||
ctnProcedure:
|
ctnProcedure:
|
||||||
begin
|
begin
|
||||||
IdentifierFoundResult:=
|
IdentifierFoundResult:=FindIdentifierInProcContext(ContextNode,Params);
|
||||||
FindIdentifierInProcContext(ContextNode,Params);
|
|
||||||
if IdentifierFoundResult in [ifrAbortSearch,ifrSuccess] then begin
|
if IdentifierFoundResult in [ifrAbortSearch,ifrSuccess] then begin
|
||||||
if CheckResult(IdentifierFoundResult=ifrSuccess,true) then begin
|
if CheckResult(IdentifierFoundResult=ifrSuccess,true) then begin
|
||||||
{$IFDEF ShowProcSearch}
|
{$IFDEF ShowProcSearch}
|
||||||
@ -9383,7 +9381,6 @@ var
|
|||||||
exit(true);
|
exit(true);
|
||||||
end;
|
end;
|
||||||
Params.Load(OldInput,false);
|
Params.Load(OldInput,false);
|
||||||
Result:=false;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ResolveIdentifier;
|
procedure ResolveIdentifier;
|
||||||
@ -9637,12 +9634,10 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Params.Load(OldInput,true);
|
Params.Load(OldInput,true);
|
||||||
if IsEnd then
|
if not IsEnd then
|
||||||
ExprType:=FindExpressionTypeOfPredefinedIdentifier(CurAtom.StartPos,
|
AliasType:=Nil;
|
||||||
Params,AliasType)
|
ExprType:=FindExpressionTypeOfPredefinedIdentifier(CurAtom.StartPos,
|
||||||
else
|
Params,AliasType)
|
||||||
ExprType:=FindExpressionTypeOfPredefinedIdentifier(CurAtom.StartPos,
|
|
||||||
Params);
|
|
||||||
{$IFDEF CheckNodeTool}
|
{$IFDEF CheckNodeTool}
|
||||||
if ExprType.Desc=xtContext then
|
if ExprType.Desc=xtContext then
|
||||||
ExprType.Context.Tool.CheckNodeTool(ExprType.Context.Node);
|
ExprType.Context.Tool.CheckNodeTool(ExprType.Context.Node);
|
||||||
|
Loading…
Reference in New Issue
Block a user