codetools: fixed TPascalParserTool.ReadBackTilBlockEnd, bug #27755

git-svn-id: trunk@48636 -
This commit is contained in:
mattias 2015-04-05 19:00:26 +00:00
parent a0ac7864a9
commit aa026d9f75
2 changed files with 2 additions and 2 deletions

View File

@ -1530,7 +1530,7 @@ begin
dec(CurPos.StartPos);
while (CurPos.StartPos>=1) do begin
if (Src[CurPos.StartPos]=#3) and (CurPos.StartPos>1)
and (Src[CurPos.StartPos-1]='}') then begin
and (Src[CurPos.StartPos-1]='{') then begin
dec(CurPos.StartPos,2);
break;
end;

View File

@ -2938,7 +2938,7 @@ begin
RaiseUnknownBlockType;
repeat
ReadPriorAtom;
if (CurPos.StartPos<1) then begin
if (CurPos.EndPos<=1) then begin
SaveRaiseExceptionFmt(ctsWordNotFound,['begin']);
end else if WordIsBlockKeyWord.DoIdentifier(@Src[CurPos.StartPos]) then begin
if (CurPos.Flag=cafEND) or (UpAtomIs('UNTIL')) then begin