mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:06:14 +02:00
* support hint directives in object declarations
This commit is contained in:
parent
e1828acc9c
commit
bd1bd1ab20
@ -37,8 +37,8 @@ implementation
|
|||||||
uses
|
uses
|
||||||
cutils,cclasses,
|
cutils,cclasses,
|
||||||
globals,verbose,systems,tokens,
|
globals,verbose,systems,tokens,
|
||||||
symconst,symbase,symsym,symtable,defutil,defcmp,
|
symconst,symbase,symsym,
|
||||||
node,nld,nmem,ncon,ncnv,ncal,pass_1,
|
node,nld,nmem,ncon,ncnv,ncal,
|
||||||
scanner,
|
scanner,
|
||||||
pbase,pexpr,pdecsub,pdecvar,ptype
|
pbase,pexpr,pdecsub,pdecvar,ptype
|
||||||
{$ifdef delphi}
|
{$ifdef delphi}
|
||||||
@ -107,6 +107,10 @@ implementation
|
|||||||
message(parser_e_property_need_paras);
|
message(parser_e_property_need_paras);
|
||||||
consume(_SEMICOLON);
|
consume(_SEMICOLON);
|
||||||
end;
|
end;
|
||||||
|
{ hint directives, these can be separated by semicolons here,
|
||||||
|
that needs to be handled here with a loop (PFV) }
|
||||||
|
while try_consume_hintdirective(p.symoptions) do
|
||||||
|
Consume(_SEMICOLON);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -473,6 +477,7 @@ implementation
|
|||||||
|
|
||||||
var
|
var
|
||||||
pd : tprocdef;
|
pd : tprocdef;
|
||||||
|
dummysymoptions : tsymoptions;
|
||||||
begin
|
begin
|
||||||
old_object_option:=current_object_option;
|
old_object_option:=current_object_option;
|
||||||
|
|
||||||
@ -606,6 +611,13 @@ implementation
|
|||||||
chkcpp(pd);
|
chkcpp(pd);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ Support hint directives }
|
||||||
|
dummysymoptions:=[];
|
||||||
|
while try_consume_hintdirective(dummysymoptions) do
|
||||||
|
Consume(_SEMICOLON);
|
||||||
|
if assigned(pd) then
|
||||||
|
pd.symoptions:=pd.symoptions+dummysymoptions;
|
||||||
|
|
||||||
parse_only:=oldparse_only;
|
parse_only:=oldparse_only;
|
||||||
end;
|
end;
|
||||||
_CONSTRUCTOR :
|
_CONSTRUCTOR :
|
||||||
@ -634,6 +646,14 @@ implementation
|
|||||||
if (po_virtualmethod in pd.procoptions) then
|
if (po_virtualmethod in pd.procoptions) then
|
||||||
include(aktclass.objectoptions,oo_has_virtual);
|
include(aktclass.objectoptions,oo_has_virtual);
|
||||||
chkcpp(pd);
|
chkcpp(pd);
|
||||||
|
|
||||||
|
{ Support hint directives }
|
||||||
|
dummysymoptions:=[];
|
||||||
|
while try_consume_hintdirective(dummysymoptions) do
|
||||||
|
Consume(_SEMICOLON);
|
||||||
|
if assigned(pd) then
|
||||||
|
pd.symoptions:=pd.symoptions+dummysymoptions;
|
||||||
|
|
||||||
parse_only:=oldparse_only;
|
parse_only:=oldparse_only;
|
||||||
end;
|
end;
|
||||||
_DESTRUCTOR :
|
_DESTRUCTOR :
|
||||||
@ -668,6 +688,13 @@ implementation
|
|||||||
|
|
||||||
chkcpp(pd);
|
chkcpp(pd);
|
||||||
|
|
||||||
|
{ Support hint directives }
|
||||||
|
dummysymoptions:=[];
|
||||||
|
while try_consume_hintdirective(dummysymoptions) do
|
||||||
|
Consume(_SEMICOLON);
|
||||||
|
if assigned(pd) then
|
||||||
|
pd.symoptions:=pd.symoptions+dummysymoptions;
|
||||||
|
|
||||||
parse_only:=oldparse_only;
|
parse_only:=oldparse_only;
|
||||||
end;
|
end;
|
||||||
_END :
|
_END :
|
||||||
@ -706,7 +733,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.78 2004-06-20 08:55:30 florian
|
Revision 1.79 2004-08-22 11:23:45 peter
|
||||||
|
* support hint directives in object declarations
|
||||||
|
|
||||||
|
Revision 1.78 2004/06/20 08:55:30 florian
|
||||||
* logs truncated
|
* logs truncated
|
||||||
|
|
||||||
Revision 1.77 2004/06/16 20:07:09 florian
|
Revision 1.77 2004/06/16 20:07:09 florian
|
||||||
|
Loading…
Reference in New Issue
Block a user