mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 20:29:14 +02:00
* fixed in_global to allow directives also after interface token
This commit is contained in:
parent
b136b62127
commit
6848d5170d
@ -224,8 +224,6 @@ unit parser;
|
||||
{ startup scanner }
|
||||
current_scanner:=new(pscannerfile,Init(filename));
|
||||
token:=current_scanner^.yylex;
|
||||
{ global switches are read, so further changes aren't allowed }
|
||||
current_module^.in_global:=false;
|
||||
|
||||
{ init code generator for a new module }
|
||||
codegen_newmodule;
|
||||
@ -372,7 +370,10 @@ unit parser;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.42 1998-09-04 08:41:59 peter
|
||||
Revision 1.43 1998-09-09 15:33:06 peter
|
||||
* fixed in_global to allow directives also after interface token
|
||||
|
||||
Revision 1.42 1998/09/04 08:41:59 peter
|
||||
* updated some error messages
|
||||
|
||||
Revision 1.41 1998/09/01 12:53:24 peter
|
||||
|
@ -26,18 +26,17 @@ unit pmodules;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
files;
|
||||
|
||||
procedure loadsystemunit;
|
||||
procedure proc_unit;
|
||||
procedure proc_program(islibrary : boolean);
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
cobjects,verbose,comphook,systems,globals,
|
||||
symtable,aasm,hcodegen,
|
||||
cobjects,comphook,systems,globals,
|
||||
symtable,aasm,files,
|
||||
hcodegen,verbose, { don't use hcodegen.message !! }
|
||||
link,assemble,import,gendef,ppu
|
||||
{$ifdef i386}
|
||||
,i386
|
||||
@ -47,6 +46,7 @@ unit pmodules;
|
||||
{$endif}
|
||||
,scanner,pbase,psystem,pdecl,psub,parser;
|
||||
|
||||
|
||||
procedure create_objectfile;
|
||||
begin
|
||||
{ create the .s file and assemble it }
|
||||
@ -167,13 +167,13 @@ unit pmodules;
|
||||
datasegment^.concat(new(pai_const,init_32bit(stacksize)));
|
||||
end;
|
||||
{$endif m68k}
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function loadunit(const s : string;compile_system:boolean) : pmodule;forward;
|
||||
|
||||
|
||||
procedure load_usedunits(compile_system:boolean);
|
||||
var
|
||||
pu : pused_unit;
|
||||
@ -473,7 +473,8 @@ unit pmodules;
|
||||
aktprocsym:=oldprocsym;
|
||||
end;
|
||||
|
||||
procedure parse_implementation_uses(symt:Psymtable);
|
||||
|
||||
procedure parse_implementation_uses(symt:Psymtable);
|
||||
begin
|
||||
if token=_USES then
|
||||
begin
|
||||
@ -486,14 +487,13 @@ unit pmodules;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure proc_unit;
|
||||
|
||||
procedure proc_unit;
|
||||
var
|
||||
{ unitname : stringid; }
|
||||
names : Tstringcontainer;
|
||||
p : psymtable;
|
||||
unitst : punitsymtable;
|
||||
storedebuglist : paasmoutput;
|
||||
pu : pused_unit;
|
||||
i : longint;
|
||||
s1,s2 : ^string; {Saves stack space}
|
||||
@ -532,6 +532,8 @@ unit pmodules;
|
||||
consume(ID);
|
||||
consume(SEMICOLON);
|
||||
consume(_INTERFACE);
|
||||
{ global switches are read, so further changes aren't allowed }
|
||||
current_module^.in_global:=false;
|
||||
|
||||
{ update status }
|
||||
status.currentmodule:=current_module^.modulename^;
|
||||
@ -646,7 +648,6 @@ unit pmodules;
|
||||
|
||||
numberunits;
|
||||
|
||||
|
||||
{ now we can change refsymtable }
|
||||
refsymtable:=p;
|
||||
|
||||
@ -770,9 +771,7 @@ unit pmodules;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure proc_program(islibrary : boolean);
|
||||
|
||||
var
|
||||
st : psymtable;
|
||||
names : Tstringcontainer;
|
||||
@ -802,7 +801,8 @@ unit pmodules;
|
||||
end;
|
||||
consume(SEMICOLON);
|
||||
end;
|
||||
|
||||
{ global switches are read, so further changes aren't allowed }
|
||||
current_module^.in_global:=false;
|
||||
{ set implementation flag }
|
||||
current_module^.in_implementation:=true;
|
||||
|
||||
@ -916,7 +916,10 @@ unit pmodules;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.47 1998-09-09 11:50:55 pierre
|
||||
Revision 1.48 1998-09-09 15:33:07 peter
|
||||
* fixed in_global to allow directives also after interface token
|
||||
|
||||
Revision 1.47 1998/09/09 11:50:55 pierre
|
||||
* forward def are not put in record or objects
|
||||
+ added check for forwards also in record and objects
|
||||
* dummy parasymtable for unit initialization removed from
|
||||
|
Loading…
Reference in New Issue
Block a user