|
@@ -805,20 +805,18 @@ implementation
|
|
|
_CLASS:
|
|
|
begin
|
|
|
is_classdef:=false;
|
|
|
- { read class method }
|
|
|
- if try_to_consume(_CLASS) then
|
|
|
- begin
|
|
|
- { class modifier is only allowed for procedures, functions, }
|
|
|
- { constructors, destructors, fields and properties }
|
|
|
- if not(token in [_FUNCTION,_PROCEDURE,_PROPERTY,_VAR,_CONSTRUCTOR,_DESTRUCTOR]) then
|
|
|
- Message(parser_e_procedure_or_function_expected);
|
|
|
-
|
|
|
- if is_interface(current_structdef) then
|
|
|
- Message(parser_e_no_static_method_in_interfaces)
|
|
|
- else
|
|
|
- { class methods are also allowed for Objective-C protocols }
|
|
|
- is_classdef:=true;
|
|
|
- end;
|
|
|
+ { 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
|
|
|
+ Message(parser_e_procedure_or_function_expected);
|
|
|
+
|
|
|
+ if is_interface(current_structdef) then
|
|
|
+ Message(parser_e_no_static_method_in_interfaces)
|
|
|
+ else
|
|
|
+ { class methods are also allowed for Objective-C protocols }
|
|
|
+ is_classdef:=true;
|
|
|
end;
|
|
|
_PROCEDURE,
|
|
|
_FUNCTION:
|