mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 18:09:15 +02:00
compiler: simplify _CLASS token handling in record declarations too
git-svn-id: trunk@16734 -
This commit is contained in:
parent
d37fde7302
commit
def46487eb
@ -753,9 +753,8 @@ implementation
|
|||||||
_CLASS:
|
_CLASS:
|
||||||
begin
|
begin
|
||||||
is_classdef:=false;
|
is_classdef:=false;
|
||||||
{ read class method }
|
{ read class method/field/property }
|
||||||
if try_to_consume(_CLASS) then
|
consume(_CLASS);
|
||||||
begin
|
|
||||||
{ class modifier is only allowed for procedures, functions, }
|
{ class modifier is only allowed for procedures, functions, }
|
||||||
{ constructors, destructors, fields and properties }
|
{ constructors, destructors, fields and properties }
|
||||||
if not(token in [_FUNCTION,_PROCEDURE,_PROPERTY,_VAR,_CONSTRUCTOR,_DESTRUCTOR,_OPERATOR]) and
|
if not(token in [_FUNCTION,_PROCEDURE,_PROPERTY,_VAR,_CONSTRUCTOR,_DESTRUCTOR,_OPERATOR]) and
|
||||||
@ -764,7 +763,6 @@ implementation
|
|||||||
|
|
||||||
is_classdef:=true;
|
is_classdef:=true;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
_PROCEDURE,
|
_PROCEDURE,
|
||||||
_FUNCTION:
|
_FUNCTION:
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user