diff --git a/compiler/pdecl.pas b/compiler/pdecl.pas index ec713a05e2..deae60addc 100644 --- a/compiler/pdecl.pas +++ b/compiler/pdecl.pas @@ -1262,17 +1262,18 @@ unit pdecl; aktprocsym^.definition^.options:=aktprocsym^.definition^.options or pooverridingmethod or povirtualmethod; end; - _ABSTRACT : begin - if (aktprocsym^.definition^.options and povirtualmethod)<>0 then - aktprocsym^.definition^.options:=aktprocsym^.definition^.options or poabstractmethod - else - Message(parser_e_only_virtual_methods_abstract); - consume(_ABSTRACT); - consume(SEMICOLON); - { the method is defined } - aktprocsym^.definition^.forwarddef:=false; - end; end; + if idtoken=_abstract then + begin + if (aktprocsym^.definition^.options and povirtualmethod)<>0 then + aktprocsym^.definition^.options:=aktprocsym^.definition^.options or poabstractmethod + else + Message(parser_e_only_virtual_methods_abstract); + consume(_ABSTRACT); + consume(SEMICOLON); + { the method is defined } + aktprocsym^.definition^.forwarddef:=false; + end; if (cs_static_keyword in aktglobalswitches) and (idtoken=_STATIC) then begin consume(_STATIC); @@ -2036,7 +2037,10 @@ unit pdecl; end. { $Log$ - Revision 1.59 1998-09-26 17:45:33 peter + Revision 1.60 1998-09-30 07:40:33 florian + * better error recovering + + Revision 1.59 1998/09/26 17:45:33 peter + idtoken and only one token table Revision 1.58 1998/09/25 00:04:01 florian diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas index ea6fe9b89a..545b6acba6 100644 --- a/compiler/pexpr.pas +++ b/compiler/pexpr.pas @@ -1396,7 +1396,12 @@ unit pexpr; end; end else - Message(parser_e_generic_methods_only_in_methods); + begin + Message(parser_e_generic_methods_only_in_methods); + again:=false; + pd:=generrordef; + p1:=genzeronode(errorn); + end; postfixoperators; end; INTCONST : begin @@ -1765,7 +1770,10 @@ unit pexpr; end. { $Log$ - Revision 1.57 1998-09-28 16:18:16 florian + Revision 1.58 1998-09-30 07:40:35 florian + * better error recovering + + Revision 1.57 1998/09/28 16:18:16 florian * two fixes to get ansi strings work Revision 1.56 1998/09/26 17:45:36 peter