mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 12:39:24 +02:00
* make it compilable with TP
+ small COM problems solved to compile classes.pp
This commit is contained in:
parent
7b8f31d56a
commit
f956607284
@ -230,6 +230,13 @@ unit pdecl;
|
|||||||
begin
|
begin
|
||||||
s:=pattern;
|
s:=pattern;
|
||||||
consume(ID);
|
consume(ID);
|
||||||
|
{ classes can be used also in classes }
|
||||||
|
if (curobjectname=pattern) and aktobjectdef^.isclass then
|
||||||
|
begin
|
||||||
|
id_type:=aktobjectdef;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
{ objects can be parameters }
|
||||||
if (testcurobject=2) and (curobjectname=pattern) then
|
if (testcurobject=2) and (curobjectname=pattern) then
|
||||||
begin
|
begin
|
||||||
id_type:=aktobjectdef;
|
id_type:=aktobjectdef;
|
||||||
@ -930,6 +937,10 @@ unit pdecl;
|
|||||||
procinfo._class:=aktclass;
|
procinfo._class:=aktclass;
|
||||||
testcurobject:=1;
|
testcurobject:=1;
|
||||||
curobjectname:=n;
|
curobjectname:=n;
|
||||||
|
|
||||||
|
{ short class declaration ? }
|
||||||
|
if token<>SEMICOLON then
|
||||||
|
begin
|
||||||
while token<>_END do
|
while token<>_END do
|
||||||
begin
|
begin
|
||||||
if (token=ID) and (pattern='PRIVATE') then
|
if (token=ID) and (pattern='PRIVATE') then
|
||||||
@ -960,6 +971,7 @@ unit pdecl;
|
|||||||
end;
|
end;
|
||||||
current_object_option:=sp_public;
|
current_object_option:=sp_public;
|
||||||
consume(_END);
|
consume(_END);
|
||||||
|
end;
|
||||||
testcurobject:=0;
|
testcurobject:=0;
|
||||||
curobjectname:='';
|
curobjectname:='';
|
||||||
|
|
||||||
@ -1096,12 +1108,6 @@ unit pdecl;
|
|||||||
until false;
|
until false;
|
||||||
dec(testcurobject);
|
dec(testcurobject);
|
||||||
consume(RKLAMMER);
|
consume(RKLAMMER);
|
||||||
if token=_OF then
|
|
||||||
begin
|
|
||||||
consume(_OF);
|
|
||||||
consume(_OBJECT);
|
|
||||||
procvardef^.options:=procvardef^.options or pomethodpointer;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
handle_procvar:=procvardef;
|
handle_procvar:=procvardef;
|
||||||
end;
|
end;
|
||||||
@ -1387,6 +1393,12 @@ unit pdecl;
|
|||||||
begin
|
begin
|
||||||
consume(_PROCEDURE);
|
consume(_PROCEDURE);
|
||||||
p:=handle_procvar;
|
p:=handle_procvar;
|
||||||
|
if token=_OF then
|
||||||
|
begin
|
||||||
|
consume(_OF);
|
||||||
|
consume(_OBJECT);
|
||||||
|
pprocvardef(p)^.options:=pprocvardef(p)^.options or pomethodpointer;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
_FUNCTION:
|
_FUNCTION:
|
||||||
begin
|
begin
|
||||||
@ -1394,6 +1406,12 @@ unit pdecl;
|
|||||||
p:=handle_procvar;
|
p:=handle_procvar;
|
||||||
consume(COLON);
|
consume(COLON);
|
||||||
pprocvardef(p)^.retdef:=single_type(hs);
|
pprocvardef(p)^.retdef:=single_type(hs);
|
||||||
|
if token=_OF then
|
||||||
|
begin
|
||||||
|
consume(_OF);
|
||||||
|
consume(_OBJECT);
|
||||||
|
pprocvardef(p)^.options:=pprocvardef(p)^.options or pomethodpointer;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
expr_type;
|
expr_type;
|
||||||
@ -1735,7 +1753,11 @@ unit pdecl;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.10 1998-04-27 23:10:28 peter
|
Revision 1.11 1998-04-28 11:45:52 florian
|
||||||
|
* make it compilable with TP
|
||||||
|
+ small COM problems solved to compile classes.pp
|
||||||
|
|
||||||
|
Revision 1.10 1998/04/27 23:10:28 peter
|
||||||
+ new scanner
|
+ new scanner
|
||||||
* $makelib -> if smartlink
|
* $makelib -> if smartlink
|
||||||
* small filename fixes pmodule.setfilename
|
* small filename fixes pmodule.setfilename
|
||||||
|
@ -784,7 +784,11 @@ const
|
|||||||
if t<>_DIR_NONE then
|
if t<>_DIR_NONE then
|
||||||
begin
|
begin
|
||||||
p:=directiveproc[t];
|
p:=directiveproc[t];
|
||||||
|
{$ifdef FPC}
|
||||||
if assigned(p) then
|
if assigned(p) then
|
||||||
|
{$else}
|
||||||
|
if @p<>nil then
|
||||||
|
{$endif}
|
||||||
p(t);
|
p(t);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -797,7 +801,11 @@ const
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 1998-04-28 10:09:54 pierre
|
Revision 1.3 1998-04-28 11:45:53 florian
|
||||||
|
* make it compilable with TP
|
||||||
|
+ small COM problems solved to compile classes.pp
|
||||||
|
|
||||||
|
Revision 1.2 1998/04/28 10:09:54 pierre
|
||||||
* typo error in asm style reading corrected
|
* typo error in asm style reading corrected
|
||||||
|
|
||||||
Revision 1.1 1998/04/27 23:13:53 peter
|
Revision 1.1 1998/04/27 23:13:53 peter
|
||||||
|
@ -118,17 +118,17 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
Message(scan_w_switch_is_global);
|
Message(scan_w_switch_is_global);
|
||||||
if assigned(proc) then
|
|
||||||
begin
|
|
||||||
{$ifdef FPC}
|
{$ifdef FPC}
|
||||||
|
if assigned(proc) then
|
||||||
proc();
|
proc();
|
||||||
{$else}
|
{$else}
|
||||||
|
if @proc<>nil then
|
||||||
proc;
|
proc;
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -158,7 +158,11 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 1998-04-27 23:13:53 peter
|
Revision 1.2 1998-04-28 11:45:53 florian
|
||||||
|
* make it compilable with TP
|
||||||
|
+ small COM problems solved to compile classes.pp
|
||||||
|
|
||||||
|
Revision 1.1 1998/04/27 23:13:53 peter
|
||||||
+ the new files for the scanner
|
+ the new files for the scanner
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user