codetools: fixed parsing const keyword in classes

git-svn-id: trunk@28514 -
This commit is contained in:
mattias 2010-11-27 19:14:07 +00:00
parent 188361e605
commit 24da9a3ae1
2 changed files with 11 additions and 5 deletions

View File

@ -3821,7 +3821,7 @@ begin
SaveRaiseException(ctsEndForClassNotFound);
'C':
if CompareSrcIdentifiers(p,'CONST')
and (BracketLvl>0) then
and (not (LastAtomIs(0,';') or LastAtomIs(0,'(') or LastAtomIs(0,'[') or LastAtomIs(0,'of'))) then
SaveRaiseException(ctsEndForClassNotFound);
'I':
if CompareSrcIdentifiers(p,'INTERFACE')
@ -3838,9 +3838,8 @@ begin
SaveRaiseException(ctsEndForClassNotFound);
'V':
if CompareSrcIdentifiers(p,'VAR')
and (BracketLvl>1) then begin
and (not (LastAtomIs(0,';') or LastAtomIs(0,'(') or LastAtomIs(0,'['))) then
SaveRaiseException(ctsEndForClassNotFound);
end;
end;
end;
end;

View File

@ -391,8 +391,15 @@ var
ParseAttribute;
'/':
begin
// ToDo: close tag
RaiseGDBException('ToDo');
inc(p);
if p^<>'>' then begin
if Fix then begin
Replace(Rel(p),0,'>');
end else begin
Error(p,'expected >');
end;
end;
exit;
end;
'>':
begin