mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 22:58:50 +02: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
|
||||
Result:=Root;
|
||||
if Result=nil then exit;
|
||||
while Result.NextBrother<>nil do
|
||||
Result:=Result.NextBrother;
|
||||
Result:=Result.GetLastNode;
|
||||
end;
|
||||
|
||||
|
@ -1751,6 +1751,8 @@ begin
|
||||
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)]);
|
||||
CursorNode:=Tree.Root;
|
||||
while CursorNode.NextBrother<>nil do
|
||||
CursorNode:=CursorNode.NextBrother;
|
||||
while CursorNode<>nil do begin
|
||||
debugln([' Node=',CursorNode.DescAsString,',Start=',CursorNode.StartPos,',End=',CursorNode.EndPos,',Src="...',dbgstr(RightStr(ExtractNode(CursorNode,[]),100)),'"']);
|
||||
CursorNode:=CursorNode.LastChild;
|
||||
|
@ -226,7 +226,7 @@ type
|
||||
public
|
||||
CurSection: TCodeTreeNodeDesc;
|
||||
|
||||
ScannedRange: TLinkScannerRange;
|
||||
ScannedRange: TLinkScannerRange; // excluding the section with a syntax error
|
||||
ScanTill: TLinkScannerRange;
|
||||
|
||||
procedure ValidateToolDependencies; virtual;
|
||||
@ -818,11 +818,10 @@ begin
|
||||
FRangeValidTill:=ScannedRange;
|
||||
if not Ok then begin
|
||||
// there is an error in the next scan range
|
||||
|
||||
end;
|
||||
{$IFDEF VerboseUpdateNeeded}
|
||||
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}
|
||||
ScanTill:=lsrEnd;
|
||||
CloseUnfinishedNodes;
|
||||
|
Loading…
Reference in New Issue
Block a user