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

View File

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