|
@@ -3229,6 +3229,7 @@ const
|
|
are written using ;procdir; or ['procdir'] syntax.
|
|
are written using ;procdir; or ['procdir'] syntax.
|
|
}
|
|
}
|
|
var
|
|
var
|
|
|
|
+ stoprecording,
|
|
res : boolean;
|
|
res : boolean;
|
|
begin
|
|
begin
|
|
if (m_mac in current_settings.modeswitches) and (cs_externally_visible in current_settings.localswitches) then
|
|
if (m_mac in current_settings.modeswitches) and (cs_externally_visible in current_settings.localswitches) then
|
|
@@ -3257,6 +3258,17 @@ const
|
|
include(pd.procoptions,po_staticmethod);
|
|
include(pd.procoptions,po_staticmethod);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+ { for a generic routine we also need to record the procedure }
|
|
|
|
+ { directives, but only if we aren't already recording for a }
|
|
|
|
+ { surrounding generic }
|
|
|
|
+ if pd.is_generic and (pd.typ=procdef) and not current_scanner.is_recording_tokens then
|
|
|
|
+ begin
|
|
|
|
+ current_scanner.startrecordtokens(tprocdef(pd).genericdecltokenbuf);
|
|
|
|
+ stoprecording:=true;
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+ stoprecording:=false;
|
|
|
|
+
|
|
while token in [_ID,_LECKKLAMMER] do
|
|
while token in [_ID,_LECKKLAMMER] do
|
|
begin
|
|
begin
|
|
if try_to_consume(_LECKKLAMMER) then
|
|
if try_to_consume(_LECKKLAMMER) then
|
|
@@ -3302,6 +3314,10 @@ const
|
|
else
|
|
else
|
|
break;
|
|
break;
|
|
end;
|
|
end;
|
|
|
|
+
|
|
|
|
+ if stoprecording then
|
|
|
|
+ current_scanner.stoprecordtokens;
|
|
|
|
+
|
|
{ nostackframe requires assembler, but assembler
|
|
{ nostackframe requires assembler, but assembler
|
|
may be specified in the implementation part only,
|
|
may be specified in the implementation part only,
|
|
and in not required if the function is first forward declared
|
|
and in not required if the function is first forward declared
|