mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 10:29:29 +02:00
codetools: fixed typo
git-svn-id: trunk@35440 -
This commit is contained in:
parent
af96f00a7e
commit
dd23bc3128
@ -1483,7 +1483,7 @@ begin
|
|||||||
RaiseCursorOutsideCode(CursorPos);
|
RaiseCursorOutsideCode(CursorPos);
|
||||||
end;
|
end;
|
||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
DebugLn('TFindDeclarationTool.FindDeclaration D CursorNode=',NodeDescriptionAsString(CursorNode.Desc),' HasChilds=',dbgs(CursorNode.FirstChild<>nil));
|
DebugLn('TFindDeclarationTool.FindDeclaration D CursorNode=',NodeDescriptionAsString(CursorNode.Desc),' HasChildren=',dbgs(CursorNode.FirstChild<>nil));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if (not IsDirtySrcValid)
|
if (not IsDirtySrcValid)
|
||||||
and (CursorNode.Desc in [ctnUsesSection,ctnUseUnit]) then begin
|
and (CursorNode.Desc in [ctnUsesSection,ctnUseUnit]) then begin
|
||||||
@ -2745,7 +2745,7 @@ var
|
|||||||
RaiseNotFound;
|
RaiseNotFound;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure MoveContextNodeToChilds;
|
procedure MoveContextNodeToChildren;
|
||||||
begin
|
begin
|
||||||
if (ContextNode.LastChild<>nil) then begin
|
if (ContextNode.LastChild<>nil) then begin
|
||||||
if not (fdfSearchForward in Params.Flags) then begin
|
if not (fdfSearchForward in Params.Flags) then begin
|
||||||
@ -3199,7 +3199,7 @@ begin
|
|||||||
// these nodes build a parent-child relationship. But in pascal
|
// these nodes build a parent-child relationship. But in pascal
|
||||||
// they just define a range and not a context.
|
// they just define a range and not a context.
|
||||||
// -> search in all children
|
// -> search in all children
|
||||||
MoveContextNodeToChilds;
|
MoveContextNodeToChildren;
|
||||||
|
|
||||||
ctnTypeDefinition, ctnVarDefinition, ctnConstDefinition,
|
ctnTypeDefinition, ctnVarDefinition, ctnConstDefinition,
|
||||||
ctnGenericType, ctnGlobalProperty:
|
ctnGenericType, ctnGlobalProperty:
|
||||||
@ -3272,7 +3272,7 @@ begin
|
|||||||
ctnRecordCase:
|
ctnRecordCase:
|
||||||
begin
|
begin
|
||||||
// search in variable and variants
|
// search in variable and variants
|
||||||
MoveContextNodeToChilds;
|
MoveContextNodeToChildren;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
@ -6127,13 +6127,13 @@ function TFindDeclarationTool.BuildInterfaceIdentifierCache(
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ScanChilds(ParentNode: TCodeTreeNode); forward;
|
procedure ScanChildren(ParentNode: TCodeTreeNode); forward;
|
||||||
|
|
||||||
procedure ScanNode(Node: TCodeTreeNode);
|
procedure ScanNode(Node: TCodeTreeNode);
|
||||||
begin
|
begin
|
||||||
case Node.Desc of
|
case Node.Desc of
|
||||||
ctnTypeSection,ctnConstSection,ctnVarSection,ctnResStrSection,ctnPropertySection:
|
ctnTypeSection,ctnConstSection,ctnVarSection,ctnResStrSection,ctnPropertySection:
|
||||||
ScanChilds(Node);
|
ScanChildren(Node);
|
||||||
ctnVarDefinition,ctnConstDefinition,ctnTypeDefinition,ctnGlobalProperty:
|
ctnVarDefinition,ctnConstDefinition,ctnTypeDefinition,ctnGlobalProperty:
|
||||||
begin
|
begin
|
||||||
FInterfaceIdentifierCache.Add(@Src[Node.StartPos],Node,Node.StartPos);
|
FInterfaceIdentifierCache.Add(@Src[Node.StartPos],Node,Node.StartPos);
|
||||||
@ -6156,7 +6156,7 @@ function TFindDeclarationTool.BuildInterfaceIdentifierCache(
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ScanChilds(ParentNode: TCodeTreeNode);
|
procedure ScanChildren(ParentNode: TCodeTreeNode);
|
||||||
var
|
var
|
||||||
Node: TCodeTreeNode;
|
Node: TCodeTreeNode;
|
||||||
begin
|
begin
|
||||||
@ -6209,7 +6209,7 @@ begin
|
|||||||
// create nodes
|
// create nodes
|
||||||
if InterfaceNode<>nil then
|
if InterfaceNode<>nil then
|
||||||
// scan interface
|
// scan interface
|
||||||
ScanChilds(InterfaceNode)
|
ScanChildren(InterfaceNode)
|
||||||
else begin
|
else begin
|
||||||
// scan program
|
// scan program
|
||||||
Node:=Tree.Root;
|
Node:=Tree.Root;
|
||||||
@ -7000,7 +7000,7 @@ var
|
|||||||
NewNode: TCodeTreeNode;
|
NewNode: TCodeTreeNode;
|
||||||
begin
|
begin
|
||||||
{$IFDEF ShowExprEval}
|
{$IFDEF ShowExprEval}
|
||||||
debugln([' FindExpressionTypeOfTerm ResolveChilds used unit -> interface node ',dbgstr(ExprType.Context.Tool.ExtractNode(ExprType.Context.Node,[]))]);
|
debugln([' FindExpressionTypeOfTerm ResolveChildren used unit -> interface node ',dbgstr(ExprType.Context.Tool.ExtractNode(ExprType.Context.Node,[]))]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
aTool:=ExprType.Context.Tool;
|
aTool:=ExprType.Context.Tool;
|
||||||
AnUnitName:=aTool.ExtractUsedUnitName(ExprType.Context.Node,@InFilename);
|
AnUnitName:=aTool.ExtractUsedUnitName(ExprType.Context.Node,@InFilename);
|
||||||
@ -7011,18 +7011,18 @@ var
|
|||||||
ExprType.Context.Node:=NewNode;
|
ExprType.Context.Node:=NewNode;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ResolveChilds;
|
procedure ResolveChildren;
|
||||||
begin
|
begin
|
||||||
if (ExprType.Context.Node=nil) then exit;
|
if (ExprType.Context.Node=nil) then exit;
|
||||||
{$IFDEF ShowExprEval}
|
{$IFDEF ShowExprEval}
|
||||||
debugln([' FindExpressionTypeOfTerm ResolveChilds']);
|
debugln([' FindExpressionTypeOfTerm ResolveChildren']);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
ResolveBaseTypeOfIdentifier;
|
ResolveBaseTypeOfIdentifier;
|
||||||
if (ExprType.Context.Node=nil) then exit;
|
if (ExprType.Context.Node=nil) then exit;
|
||||||
if (ExprType.Context.Node.Desc in AllUsableSourceTypes) then begin
|
if (ExprType.Context.Node.Desc in AllUsableSourceTypes) then begin
|
||||||
// unit name => interface
|
// unit name => interface
|
||||||
{$IFDEF ShowExprEval}
|
{$IFDEF ShowExprEval}
|
||||||
debugln([' FindExpressionTypeOfTerm ResolveChilds unit -> interface node']);
|
debugln([' FindExpressionTypeOfTerm ResolveChildren unit -> interface node']);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
ExprType.Context.Node:=ExprType.Context.Tool.GetInterfaceNode;
|
ExprType.Context.Node:=ExprType.Context.Tool.GetInterfaceNode;
|
||||||
end
|
end
|
||||||
@ -7061,7 +7061,7 @@ var
|
|||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
RaiseIdentExpected;
|
RaiseIdentExpected;
|
||||||
end;
|
end;
|
||||||
ResolveChilds;
|
ResolveChildren;
|
||||||
if (ExprType.Context.Node=nil) then begin
|
if (ExprType.Context.Node=nil) then begin
|
||||||
MoveCursorToCleanPos(CurAtom.StartPos);
|
MoveCursorToCleanPos(CurAtom.StartPos);
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
@ -7466,7 +7466,7 @@ begin
|
|||||||
until CurAtom.EndPos>EndPos;
|
until CurAtom.EndPos>EndPos;
|
||||||
|
|
||||||
if fdfFunctionResult in StartFlags then
|
if fdfFunctionResult in StartFlags then
|
||||||
ResolveChilds;
|
ResolveChildren;
|
||||||
|
|
||||||
Result:=ExprType;
|
Result:=ExprType;
|
||||||
if (Result.Desc=xtContext) and (not (fdfFindVariable in StartFlags)) then
|
if (Result.Desc=xtContext) and (not (fdfFindVariable in StartFlags)) then
|
||||||
|
Loading…
Reference in New Issue
Block a user