mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-23 21:19:35 +01:00
codetools: better debugging out
git-svn-id: trunk@39900 -
This commit is contained in:
parent
f568eeece5
commit
a5bf4cd13b
@ -1019,6 +1019,8 @@ function TCodeTree.GetLastNode: TCodeTreeNode;
|
|||||||
begin
|
begin
|
||||||
Result:=Root;
|
Result:=Root;
|
||||||
if Result=nil then exit;
|
if Result=nil then exit;
|
||||||
|
while Result.NextBrother<>nil do
|
||||||
|
Result:=Result.NextBrother;
|
||||||
Result:=Result.GetLastNode;
|
Result:=Result.GetLastNode;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -1751,6 +1751,8 @@ begin
|
|||||||
if CursorPos.Y<=CursorPos.Code.LineCount then
|
if CursorPos.Y<=CursorPos.Code.LineCount then
|
||||||
debugln([' Line=',dbgstr(CursorPos.Code.GetLine(CursorPos.Y-1),1,CursorPos.X-1),'|',dbgstr(CursorPos.Code.GetLine(CursorPos.Y-1),CursorPos.X,100)]);
|
debugln([' Line=',dbgstr(CursorPos.Code.GetLine(CursorPos.Y-1),1,CursorPos.X-1),'|',dbgstr(CursorPos.Code.GetLine(CursorPos.Y-1),CursorPos.X,100)]);
|
||||||
CursorNode:=Tree.Root;
|
CursorNode:=Tree.Root;
|
||||||
|
while CursorNode.NextBrother<>nil do
|
||||||
|
CursorNode:=CursorNode.NextBrother;
|
||||||
while CursorNode<>nil do begin
|
while CursorNode<>nil do begin
|
||||||
debugln([' Node=',CursorNode.DescAsString,',Start=',CursorNode.StartPos,',End=',CursorNode.EndPos,',Src="...',dbgstr(RightStr(ExtractNode(CursorNode,[]),100)),'"']);
|
debugln([' Node=',CursorNode.DescAsString,',Start=',CursorNode.StartPos,',End=',CursorNode.EndPos,',Src="...',dbgstr(RightStr(ExtractNode(CursorNode,[]),100)),'"']);
|
||||||
CursorNode:=CursorNode.LastChild;
|
CursorNode:=CursorNode.LastChild;
|
||||||
|
|||||||
@ -226,7 +226,7 @@ type
|
|||||||
public
|
public
|
||||||
CurSection: TCodeTreeNodeDesc;
|
CurSection: TCodeTreeNodeDesc;
|
||||||
|
|
||||||
ScannedRange: TLinkScannerRange;
|
ScannedRange: TLinkScannerRange; // excluding the section with a syntax error
|
||||||
ScanTill: TLinkScannerRange;
|
ScanTill: TLinkScannerRange;
|
||||||
|
|
||||||
procedure ValidateToolDependencies; virtual;
|
procedure ValidateToolDependencies; virtual;
|
||||||
@ -818,11 +818,10 @@ begin
|
|||||||
FRangeValidTill:=ScannedRange;
|
FRangeValidTill:=ScannedRange;
|
||||||
if not Ok then begin
|
if not Ok then begin
|
||||||
// there is an error in the next scan range
|
// there is an error in the next scan range
|
||||||
|
|
||||||
end;
|
end;
|
||||||
{$IFDEF VerboseUpdateNeeded}
|
{$IFDEF VerboseUpdateNeeded}
|
||||||
Node:=Tree.GetLastNode;
|
Node:=Tree.GetLastNode;
|
||||||
debugln(['TPascalParserTool.BuildTree scanned without error till ',dbgs(FRangeValidTill),' (wanted:',dbgs(ScanTill),') Atom="',dbgstr(GetAtom),'" at ',CleanPosToStr(CurPos.StartPos),' LastNode=',Node.DescAsString,',Start=',Node.StartPos]);
|
debugln(['TPascalParserTool.BuildTree scanned ',BoolToStr(ok,'till ','without error till '),dbgs(FRangeValidTill),' (wanted:',dbgs(ScanTill),') Atom="',dbgstr(GetAtom),'" at ',CurPos.StartPos,'=',CleanPosToStr(CurPos.StartPos),' LastNode=',Node.DescAsString,',Start=',Node.StartPos]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
ScanTill:=lsrEnd;
|
ScanTill:=lsrEnd;
|
||||||
CloseUnfinishedNodes;
|
CloseUnfinishedNodes;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user