mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 01:35:58 +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);
|
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;
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user