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; end;
MoveCursorToFirstProcSpecifier(ANode); MoveCursorToFirstProcSpecifier(ANode);
if (CurPos.Flag<>cafSemicolon) and (CurPos.EndPos<ANode.FirstChild.EndPos) if (CurPos.Flag<>cafSemicolon) and (CurPos.EndPos<ANode.FirstChild.EndPos)
and (LastAtoms.Count>0)
then begin then begin
// add missing semicolon in front of proc modifiers // add missing semicolon in front of proc modifiers
UndoReadNextAtom; UndoReadNextAtom;

View File

@ -873,12 +873,13 @@ begin
end else begin end else begin
MoveCursorToNodeStart(ProcNode); MoveCursorToNodeStart(ProcNode);
ReadNextAtom; ReadNextAtom;
if AtomIsIdentifier(false) then begin if AtomIsCustomOperator(true,false) then begin
// read name // read name
ReadNextAtom; ReadNextAtom;
while (CurPos.Flag=cafPoint) do begin while (CurPos.Flag=cafPoint) do begin
ReadNextAtom; ReadNextAtom;
if CurPos.Flag<>cafWord then break; if CurPos.Flag in [cafPoint,cafRoundBracketOpen,cafEdgedBracketOpen,cafColon,cafEnd,cafSemicolon]
then break;
ReadNextAtom; ReadNextAtom;
end; end;
end; end;
@ -900,7 +901,7 @@ begin
end; end;
end; 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; end;
function TPascalReaderTool.MoveCursorToProcSpecifier(ProcNode: TCodeTreeNode; function TPascalReaderTool.MoveCursorToProcSpecifier(ProcNode: TCodeTreeNode;