mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 11:09:23 +02:00
* Allow RTTI directive also before uses clauses
This commit is contained in:
parent
48f422020a
commit
d5cc58a0a2
@ -1970,7 +1970,8 @@ type
|
|||||||
resources_used : boolean;
|
resources_used : boolean;
|
||||||
program_uses_checkpointer : boolean;
|
program_uses_checkpointer : boolean;
|
||||||
program_name : ansistring;
|
program_name : ansistring;
|
||||||
consume_semicolon_after_uses : boolean;
|
consume_semicolon_after_uses,
|
||||||
|
consume_semicolon_after_loaded : boolean;
|
||||||
ps : tprogramparasym;
|
ps : tprogramparasym;
|
||||||
paramnum : longint;
|
paramnum : longint;
|
||||||
textsym : ttypesym;
|
textsym : ttypesym;
|
||||||
@ -1987,6 +1988,8 @@ type
|
|||||||
init_procinfo:=nil;
|
init_procinfo:=nil;
|
||||||
finalize_procinfo:=nil;
|
finalize_procinfo:=nil;
|
||||||
resources_used:=false;
|
resources_used:=false;
|
||||||
|
consume_semicolon_after_loaded:=false;
|
||||||
|
|
||||||
{ make the compiler happy and avoid an uninitialized variable warning on Setlength(sc,length(sc)+1); }
|
{ make the compiler happy and avoid an uninitialized variable warning on Setlength(sc,length(sc)+1); }
|
||||||
sc:=nil;
|
sc:=nil;
|
||||||
|
|
||||||
@ -2049,7 +2052,7 @@ type
|
|||||||
read, all following directives are parsed as well }
|
read, all following directives are parsed as well }
|
||||||
setupglobalswitches;
|
setupglobalswitches;
|
||||||
|
|
||||||
consume(_SEMICOLON);
|
consume_semicolon_after_loaded:=true;
|
||||||
|
|
||||||
{$ifdef DEBUG_NODE_XML}
|
{$ifdef DEBUG_NODE_XML}
|
||||||
XMLInitializeNodeFile('library', program_name);
|
XMLInitializeNodeFile('library', program_name);
|
||||||
@ -2099,7 +2102,7 @@ type
|
|||||||
read, all following directives are parsed as well }
|
read, all following directives are parsed as well }
|
||||||
setupglobalswitches;
|
setupglobalswitches;
|
||||||
|
|
||||||
consume(_SEMICOLON);
|
consume_semicolon_after_loaded:=true;
|
||||||
|
|
||||||
{$ifdef DEBUG_NODE_XML}
|
{$ifdef DEBUG_NODE_XML}
|
||||||
XMLInitializeNodeFile('program', program_name);
|
XMLInitializeNodeFile('program', program_name);
|
||||||
@ -2122,9 +2125,6 @@ type
|
|||||||
package or not }
|
package or not }
|
||||||
load_packages;
|
load_packages;
|
||||||
|
|
||||||
{ global switches are read, so further changes aren't allowed }
|
|
||||||
current_module.in_global:=false;
|
|
||||||
|
|
||||||
{ set implementation flag }
|
{ set implementation flag }
|
||||||
current_module.in_interface:=false;
|
current_module.in_interface:=false;
|
||||||
current_module.interface_compiled:=true;
|
current_module.interface_compiled:=true;
|
||||||
@ -2136,6 +2136,13 @@ type
|
|||||||
{ load system unit }
|
{ load system unit }
|
||||||
loadsystemunit;
|
loadsystemunit;
|
||||||
|
|
||||||
|
{ consume the semicolon now that the system unit is loaded }
|
||||||
|
if consume_semicolon_after_loaded then
|
||||||
|
consume(_SEMICOLON);
|
||||||
|
|
||||||
|
{ global switches are read, so further changes aren't allowed }
|
||||||
|
current_module.in_global:=false;
|
||||||
|
|
||||||
{ system unit is loaded, now insert feature defines }
|
{ system unit is loaded, now insert feature defines }
|
||||||
for feature:=low(tfeature) to high(tfeature) do
|
for feature:=low(tfeature) to high(tfeature) do
|
||||||
if feature in features then
|
if feature in features then
|
||||||
|
Loading…
Reference in New Issue
Block a user