mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 02:19:57 +02:00
codetools: fixed parsing const keyword in classes
git-svn-id: trunk@28514 -
This commit is contained in:
parent
188361e605
commit
24da9a3ae1
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user