mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 19:19:24 +02:00
* exit is now a syssym instead of a keyword
This commit is contained in:
parent
106ba3fd82
commit
31da813d1d
@ -57,6 +57,7 @@ const
|
||||
in_finalize_x = 45;
|
||||
in_new_x = 46;
|
||||
in_dispose_x = 47;
|
||||
in_exit = 48;
|
||||
|
||||
{ Internal constant functions }
|
||||
in_const_trunc = 100;
|
||||
@ -104,7 +105,10 @@ const
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.7 2002-05-18 13:34:06 peter
|
||||
Revision 1.8 2002-07-16 15:34:20 florian
|
||||
* exit is now a syssym instead of a keyword
|
||||
|
||||
Revision 1.7 2002/05/18 13:34:06 peter
|
||||
* readded missing revisions
|
||||
|
||||
Revision 1.6 2002/05/16 19:46:35 carl
|
||||
|
@ -185,7 +185,7 @@ begin
|
||||
{ set param1 interface to self }
|
||||
adjustselfvalue(ioffset);
|
||||
|
||||
{ case 1 or 2 }
|
||||
{ case 1 or 2 }
|
||||
if (po_clearstack in procdef.procoptions) then
|
||||
begin
|
||||
if po_virtualmethod in procdef.procoptions then
|
||||
@ -237,7 +237,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.11 2002-07-01 18:46:33 peter
|
||||
Revision 1.12 2002-07-16 15:34:21 florian
|
||||
* exit is now a syssym instead of a keyword
|
||||
|
||||
Revision 1.11 2002/07/01 18:46:33 peter
|
||||
* internal linker
|
||||
* reorganized aasm layer
|
||||
|
||||
@ -294,5 +297,4 @@ end.
|
||||
R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
|
||||
- list field removed of the tnode class because it's not used currently
|
||||
and can cause hard-to-find bugs
|
||||
|
||||
}
|
||||
|
@ -257,6 +257,22 @@ implementation
|
||||
statement_syssym := p1;
|
||||
end;
|
||||
|
||||
in_exit :
|
||||
begin
|
||||
if try_to_consume(_LKLAMMER) then
|
||||
begin
|
||||
p1:=comp_expr(true);
|
||||
consume(_RKLAMMER);
|
||||
if (block_type=bt_except) then
|
||||
Message(parser_e_exit_with_argument_not__possible);
|
||||
if is_void(aktprocdef.rettype.def) then
|
||||
Message(parser_e_void_function);
|
||||
end
|
||||
else
|
||||
p1:=nil;
|
||||
statement_syssym:=cexitnode.create(p1);
|
||||
end;
|
||||
|
||||
in_break :
|
||||
begin
|
||||
statement_syssym:=cbreaknode.create;
|
||||
@ -2235,7 +2251,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.70 2002-07-06 20:18:02 carl
|
||||
Revision 1.71 2002-07-16 15:34:20 florian
|
||||
* exit is now a syssym instead of a keyword
|
||||
|
||||
Revision 1.70 2002/07/06 20:18:02 carl
|
||||
* longstring declaration now gives parser error since its not supported!
|
||||
|
||||
Revision 1.69 2002/06/12 15:46:14 jonas
|
||||
|
@ -719,30 +719,6 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function exit_statement : tnode;
|
||||
|
||||
var
|
||||
p : tnode;
|
||||
|
||||
begin
|
||||
consume(_EXIT);
|
||||
if try_to_consume(_LKLAMMER) then
|
||||
begin
|
||||
p:=comp_expr(true);
|
||||
consume(_RKLAMMER);
|
||||
if (block_type=bt_except) then
|
||||
Message(parser_e_exit_with_argument_not__possible);
|
||||
if is_void(aktprocdef.rettype.def) then
|
||||
Message(parser_e_void_function);
|
||||
end
|
||||
else
|
||||
p:=nil;
|
||||
p:=cexitnode.create(p);
|
||||
do_resulttypepass(p);
|
||||
exit_statement:=p;
|
||||
end;
|
||||
|
||||
|
||||
function _asm_statement : tnode;
|
||||
var
|
||||
asmstat : tasmnode;
|
||||
@ -993,8 +969,6 @@ implementation
|
||||
consume(_FAIL);
|
||||
code:=cfailnode.create;
|
||||
end;
|
||||
_EXIT :
|
||||
code:=exit_statement;
|
||||
_ASM :
|
||||
code:=_asm_statement;
|
||||
_EOF :
|
||||
@ -1036,7 +1010,7 @@ implementation
|
||||
{ with a separate statement for each read/write operation (JM) }
|
||||
{ the same is true for val() if the third parameter is not 32 bit }
|
||||
if not(p.nodetype in [nothingn,calln,assignn,breakn,inlinen,
|
||||
continuen,labeln,blockn]) then
|
||||
continuen,labeln,blockn,exitn]) then
|
||||
Message(cg_e_illegal_expression);
|
||||
|
||||
{ specify that we don't use the value returned by the call }
|
||||
@ -1257,7 +1231,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.61 2002-07-11 14:41:28 florian
|
||||
Revision 1.62 2002-07-16 15:34:20 florian
|
||||
* exit is now a syssym instead of a keyword
|
||||
|
||||
Revision 1.61 2002/07/11 14:41:28 florian
|
||||
* start of the new generic parameter handling
|
||||
|
||||
Revision 1.60 2002/07/04 20:43:01 florian
|
||||
|
@ -65,6 +65,7 @@ begin
|
||||
p.insert(tsyssym.create('Exclude',in_exclude_x_y));
|
||||
p.insert(tsyssym.create('Include',in_include_x_y));
|
||||
p.insert(tsyssym.create('Break',in_break));
|
||||
p.insert(tsyssym.create('Exit',in_exit));
|
||||
p.insert(tsyssym.create('Continue',in_continue));
|
||||
p.insert(tsyssym.create('Dec',in_dec_x));
|
||||
p.insert(tsyssym.create('Inc',in_inc_x));
|
||||
@ -289,7 +290,10 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.30 2002-07-07 09:52:32 florian
|
||||
Revision 1.31 2002-07-16 15:34:21 florian
|
||||
* exit is now a syssym instead of a keyword
|
||||
|
||||
Revision 1.30 2002/07/07 09:52:32 florian
|
||||
* powerpc target fixed, very simple units can be compiled
|
||||
* some basic stuff for better callparanode handling, far from being finished
|
||||
|
||||
@ -345,4 +349,4 @@ end.
|
||||
instead of direct comparisons of low/high values of orddefs because
|
||||
qword is a special case
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1264,7 +1264,7 @@ implementation
|
||||
not(assigned(procinfo^.parent^._class)))
|
||||
) and
|
||||
{ funcretsym is allowed !! }
|
||||
(sym.typ <> funcretsym) then
|
||||
(sym.typ<>funcretsym) then
|
||||
begin
|
||||
hsym:=search_class_member(procinfo^._class,sym.name);
|
||||
{ private ids can be reused }
|
||||
@ -2065,7 +2065,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.63 2002-07-15 19:44:53 florian
|
||||
Revision 1.64 2002-07-16 15:34:21 florian
|
||||
* exit is now a syssym instead of a keyword
|
||||
|
||||
Revision 1.63 2002/07/15 19:44:53 florian
|
||||
* fixed crash with default parameters and stdcall calling convention
|
||||
|
||||
Revision 1.62 2002/07/01 18:46:28 peter
|
||||
|
@ -341,7 +341,7 @@ const
|
||||
(str:'CASE' ;special:false;keyword:m_all;op:NOTOKEN),
|
||||
(str:'CVAR' ;special:false;keyword:m_none;op:NOTOKEN),
|
||||
(str:'ELSE' ;special:false;keyword:m_all;op:NOTOKEN),
|
||||
(str:'EXIT' ;special:false;keyword:m_all;op:NOTOKEN),
|
||||
(str:'EXIT' ;special:false;keyword:m_none;op:NOTOKEN),
|
||||
(str:'FAIL' ;special:false;keyword:m_none;op:NOTOKEN), { only set within constructors PM }
|
||||
(str:'FILE' ;special:false;keyword:m_all;op:NOTOKEN),
|
||||
(str:'GOTO' ;special:false;keyword:m_all;op:NOTOKEN),
|
||||
@ -497,7 +497,10 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.18 2002-05-18 13:34:21 peter
|
||||
Revision 1.19 2002-07-16 15:34:21 florian
|
||||
* exit is now a syssym instead of a keyword
|
||||
|
||||
Revision 1.18 2002/05/18 13:34:21 peter
|
||||
* readded missing revisions
|
||||
|
||||
Revision 1.17 2002/05/16 19:46:46 carl
|
||||
|
Loading…
Reference in New Issue
Block a user