compiler: simplify _CLASS token handling in object declarations by Sven Barth (issue #18425)

git-svn-id: trunk@16733 -
This commit is contained in:
paul 2011-01-08 05:24:25 +00:00
parent b49b3ecc61
commit d37fde7302

View File

@ -805,9 +805,8 @@ implementation
_CLASS:
begin
is_classdef:=false;
{ read class method }
if try_to_consume(_CLASS) then
begin
{ read class method/field/property }
consume(_CLASS);
{ class modifier is only allowed for procedures, functions, }
{ constructors, destructors, fields and properties }
if not(token in [_FUNCTION,_PROCEDURE,_PROPERTY,_VAR,_CONSTRUCTOR,_DESTRUCTOR]) then
@ -819,7 +818,6 @@ implementation
{ class methods are also allowed for Objective-C protocols }
is_classdef:=true;
end;
end;
_PROCEDURE,
_FUNCTION:
begin