codetools: parse initialization with with statements

git-svn-id: trunk@34956 -
This commit is contained in:
mattias 2012-01-26 15:19:57 +00:00
parent cd6db590b3
commit 98a0eef795

View File

@ -2460,7 +2460,10 @@ begin
repeat repeat
ReadNextAtom; ReadNextAtom;
if (CurPos.StartPos>SrcLen) then break; if (CurPos.StartPos>SrcLen) then break;
if (CurSection=ctnInitialization) and UpAtomIs('FINALIZATION') then if CurPos.Flag=cafEND then begin
Result:=KeyWordFuncEndPoint;
break;
end else if (CurSection=ctnInitialization) and UpAtomIs('FINALIZATION') then
begin begin
CurNode.EndPos:=CurPos.EndPos; CurNode.EndPos:=CurPos.EndPos;
EndChildNode; EndChildNode;
@ -2470,12 +2473,11 @@ begin
CurSection:=CurNode.Desc; CurSection:=CurNode.Desc;
ScannedRange:=lsrFinalizationStart; ScannedRange:=lsrFinalizationStart;
if ord(ScanTill)<=ord(ScannedRange) then exit; if ord(ScanTill)<=ord(ScannedRange) then exit;
end else if EndKeyWordFuncList.DoIdentifier(@Src[CurPos.StartPos]) then end else if BlockStatementStartKeyWordFuncList.DoIdentifier(@Src[CurPos.StartPos])
begin then begin
ReadTilBlockEnd(false,false); if not ReadTilBlockEnd(false,true) then RaiseEndOfSourceExpected;
end else if CurPos.Flag=cafEND then begin end else if UpAtomIs('WITH') then begin
Result:=KeyWordFuncEndPoint; ReadWithStatement(true,true);
break;
end; end;
until false; until false;
Result:=true; Result:=true;