codetools: fixed MoveCursorToFirstProcSpecifier parsing operator

git-svn-id: trunk@34993 -
This commit is contained in:
mattias 2012-01-28 17:18:50 +00:00
parent 3f0753c04f
commit 325e87fb8e
2 changed files with 5 additions and 3 deletions

View File

@ -7284,6 +7284,7 @@ begin
end;
MoveCursorToFirstProcSpecifier(ANode);
if (CurPos.Flag<>cafSemicolon) and (CurPos.EndPos<ANode.FirstChild.EndPos)
and (LastAtoms.Count>0)
then begin
// add missing semicolon in front of proc modifiers
UndoReadNextAtom;

View File

@ -873,12 +873,13 @@ begin
end else begin
MoveCursorToNodeStart(ProcNode);
ReadNextAtom;
if AtomIsIdentifier(false) then begin
if AtomIsCustomOperator(true,false) then begin
// read name
ReadNextAtom;
while (CurPos.Flag=cafPoint) do begin
ReadNextAtom;
if CurPos.Flag<>cafWord then break;
if CurPos.Flag in [cafPoint,cafRoundBracketOpen,cafEdgedBracketOpen,cafColon,cafEnd,cafSemicolon]
then break;
ReadNextAtom;
end;
end;
@ -900,7 +901,7 @@ begin
end;
end;
end;
// CurPos now stands on the first proc specifier or on a semicolon
// CurPos now stands on the first proc specifier or on a semicolon or on the syntax error
end;
function TPascalReaderTool.MoveCursorToProcSpecifier(ProcNode: TCodeTreeNode;