mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 02:49:19 +02:00
codetools: class completion: if unit was parsed with error: reraise error
git-svn-id: trunk@29105 -
This commit is contained in:
parent
08cadf3903
commit
666cc1741f
@ -456,7 +456,7 @@ var
|
|||||||
Pos2: Integer;
|
Pos2: Integer;
|
||||||
begin
|
begin
|
||||||
//DebugLn(['TCodeCompletionCodeTool.CheckWholeUnitParsed ',EndOfSourceFound,' LastErrorMessage="',LastErrorMessage,'" LastErrorCurPos=',dbgs(LastErrorCurPos)]);
|
//DebugLn(['TCodeCompletionCodeTool.CheckWholeUnitParsed ',EndOfSourceFound,' LastErrorMessage="',LastErrorMessage,'" LastErrorCurPos=',dbgs(LastErrorCurPos)]);
|
||||||
if EndOfSourceFound then exit;
|
if EndOfSourceFound and (not LastErrorValid) then exit;
|
||||||
Pos1:=0;
|
Pos1:=0;
|
||||||
Pos2:=0;
|
Pos2:=0;
|
||||||
if Node1<>nil then Pos1:=Node1.StartPos;
|
if Node1<>nil then Pos1:=Node1.StartPos;
|
||||||
@ -6169,6 +6169,10 @@ begin
|
|||||||
ANode:=FCompletingStartNode;
|
ANode:=FCompletingStartNode;
|
||||||
while (ANode<>nil) do begin
|
while (ANode<>nil) do begin
|
||||||
if ANode.Desc=ctnProcedure then begin
|
if ANode.Desc=ctnProcedure then begin
|
||||||
|
if ANode.FirstChild=nil then begin
|
||||||
|
debugln(['TCodeCompletionCodeTool.InsertMissingClassSemicolons warning: broken proc node: ',CleanPosToStr(ANode.StartPos)]);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
ProcCode:=ExtractProcHead(ANode,[phpWithStart,
|
ProcCode:=ExtractProcHead(ANode,[phpWithStart,
|
||||||
phpWithoutClassKeyword,
|
phpWithoutClassKeyword,
|
||||||
phpWithVarModifiers,phpWithParameterNames,phpWithResultType,
|
phpWithVarModifiers,phpWithParameterNames,phpWithResultType,
|
||||||
|
@ -787,6 +787,7 @@ begin
|
|||||||
+' TPascalParserTool.MoveCursorFirstProcSpecifier: '
|
+' TPascalParserTool.MoveCursorFirstProcSpecifier: '
|
||||||
+' (ProcNode=nil) or (ProcNode.Desc<>ctnProcedure)');
|
+' (ProcNode=nil) or (ProcNode.Desc<>ctnProcedure)');
|
||||||
end;
|
end;
|
||||||
|
if ProcNode.FirstChild=nil then exit;
|
||||||
MoveCursorToNodeStart(ProcNode.FirstChild);
|
MoveCursorToNodeStart(ProcNode.FirstChild);
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
if AtomIsIdentifier(false) then begin
|
if AtomIsIdentifier(false) then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user