mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 18:49:16 +02:00
+ the expr for names and indizies of exports sections support now
every type of expressions which evalute to a constant
This commit is contained in:
parent
5b6c306f6d
commit
bd5719a93e
@ -33,7 +33,7 @@ unit pexports;
|
|||||||
globtype,systems,tokens,
|
globtype,systems,tokens,
|
||||||
strings,cobjects,globals,verbose,
|
strings,cobjects,globals,verbose,
|
||||||
scanner,symconst,symtable,pbase,
|
scanner,symconst,symtable,pbase,
|
||||||
export,GenDef;
|
export,GenDef,tree,pass_1,pexpr;
|
||||||
|
|
||||||
procedure read_exports;
|
procedure read_exports;
|
||||||
|
|
||||||
@ -43,6 +43,8 @@ unit pexports;
|
|||||||
DefString:string;
|
DefString:string;
|
||||||
ProcName:string;
|
ProcName:string;
|
||||||
InternalProcName:string;
|
InternalProcName:string;
|
||||||
|
pt : ptree;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
DefString:='';
|
DefString:='';
|
||||||
InternalProcName:='';
|
InternalProcName:='';
|
||||||
@ -90,9 +92,17 @@ unit pexports;
|
|||||||
if (idtoken=_INDEX) then
|
if (idtoken=_INDEX) then
|
||||||
begin
|
begin
|
||||||
consume(_INDEX);
|
consume(_INDEX);
|
||||||
|
pt:=comp_expr(true);
|
||||||
|
do_firstpass(pt);
|
||||||
|
if pt^.treetype=ordconstn then
|
||||||
|
hp^.index:=pt^.value
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
hp^.index:=0;
|
||||||
|
consume(_INTCONST);
|
||||||
|
end;
|
||||||
hp^.options:=hp^.options or eo_index;
|
hp^.options:=hp^.options or eo_index;
|
||||||
val(pattern,hp^.index,code);
|
disposetree(pt);
|
||||||
consume(_INTCONST);
|
|
||||||
if target_os.id=os_i386_win32 then
|
if target_os.id=os_i386_win32 then
|
||||||
DefString:=ProcName+'='+InternalProcName+' @ '+tostr(hp^.index)
|
DefString:=ProcName+'='+InternalProcName+' @ '+tostr(hp^.index)
|
||||||
else
|
else
|
||||||
@ -101,12 +111,17 @@ unit pexports;
|
|||||||
if (idtoken=_NAME) then
|
if (idtoken=_NAME) then
|
||||||
begin
|
begin
|
||||||
consume(_NAME);
|
consume(_NAME);
|
||||||
hp^.name:=stringdup(pattern);
|
pt:=comp_expr(true);
|
||||||
hp^.options:=hp^.options or eo_name;
|
do_firstpass(pt);
|
||||||
if token=_CCHAR then
|
if pt^.treetype=stringconstn then
|
||||||
consume(_CCHAR)
|
hp^.name:=stringdup(strpas(pt^.value_str))
|
||||||
else
|
else
|
||||||
consume(_CSTRING);
|
begin
|
||||||
|
hp^.name:=stringdup('');
|
||||||
|
consume(_CSTRING);
|
||||||
|
end;
|
||||||
|
hp^.options:=hp^.options or eo_name;
|
||||||
|
disposetree(pt);
|
||||||
DefString:=hp^.name^+'='+InternalProcName;
|
DefString:=hp^.name^+'='+InternalProcName;
|
||||||
end;
|
end;
|
||||||
if (idtoken=_RESIDENT) then
|
if (idtoken=_RESIDENT) then
|
||||||
@ -141,7 +156,11 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.19 2000-02-09 13:22:56 peter
|
Revision 1.20 2000-02-23 23:06:39 florian
|
||||||
|
+ the expr for names and indizies of exports sections support now
|
||||||
|
every type of expressions which evalute to a constant
|
||||||
|
|
||||||
|
Revision 1.19 2000/02/09 13:22:56 peter
|
||||||
* log truncated
|
* log truncated
|
||||||
|
|
||||||
Revision 1.18 2000/01/07 01:14:28 peter
|
Revision 1.18 2000/01/07 01:14:28 peter
|
||||||
@ -188,4 +207,4 @@ end.
|
|||||||
* moved bitmask constants to sets
|
* moved bitmask constants to sets
|
||||||
* some other type/const renamings
|
* some other type/const renamings
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user