mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 11:29:27 +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;
|
||||
begin
|
||||
//DebugLn(['TCodeCompletionCodeTool.CheckWholeUnitParsed ',EndOfSourceFound,' LastErrorMessage="',LastErrorMessage,'" LastErrorCurPos=',dbgs(LastErrorCurPos)]);
|
||||
if EndOfSourceFound then exit;
|
||||
if EndOfSourceFound and (not LastErrorValid) then exit;
|
||||
Pos1:=0;
|
||||
Pos2:=0;
|
||||
if Node1<>nil then Pos1:=Node1.StartPos;
|
||||
@ -6169,6 +6169,10 @@ begin
|
||||
ANode:=FCompletingStartNode;
|
||||
while (ANode<>nil) do 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,
|
||||
phpWithoutClassKeyword,
|
||||
phpWithVarModifiers,phpWithParameterNames,phpWithResultType,
|
||||
|
@ -787,6 +787,7 @@ begin
|
||||
+' TPascalParserTool.MoveCursorFirstProcSpecifier: '
|
||||
+' (ProcNode=nil) or (ProcNode.Desc<>ctnProcedure)');
|
||||
end;
|
||||
if ProcNode.FirstChild=nil then exit;
|
||||
MoveCursorToNodeStart(ProcNode.FirstChild);
|
||||
ReadNextAtom;
|
||||
if AtomIsIdentifier(false) then begin
|
||||
|
Loading…
Reference in New Issue
Block a user