mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 02:59:21 +02:00
* except is also an end of block token
* after a label don't try to parse a statement when the next token is an end token
This commit is contained in:
parent
cbbfb018f1
commit
607b41f22e
@ -35,7 +35,7 @@ interface
|
|||||||
const
|
const
|
||||||
{ tokens that end a block or statement. And don't require
|
{ tokens that end a block or statement. And don't require
|
||||||
a ; on the statement before }
|
a ; on the statement before }
|
||||||
endtokens = [_SEMICOLON,_END,_ELSE,_UNTIL];
|
endtokens = [_SEMICOLON,_END,_ELSE,_UNTIL,_EXCEPT];
|
||||||
|
|
||||||
{ true, if we are after an assignement }
|
{ true, if we are after an assignement }
|
||||||
afterassignment : boolean = false;
|
afterassignment : boolean = false;
|
||||||
@ -270,7 +270,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.25 2003-09-23 17:56:05 peter
|
Revision 1.26 2004-01-22 17:24:49 peter
|
||||||
|
* except is also an end of block token
|
||||||
|
* after a label don't try to parse a statement when the next token
|
||||||
|
is an end token
|
||||||
|
|
||||||
|
Revision 1.25 2003/09/23 17:56:05 peter
|
||||||
* locals and paras are allocated in the code generation
|
* locals and paras are allocated in the code generation
|
||||||
* tvarsym.localloc contains the location of para/local when
|
* tvarsym.localloc contains the location of para/local when
|
||||||
generating code for the current procedure
|
generating code for the current procedure
|
||||||
|
@ -939,7 +939,10 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ the pointer to the following instruction }
|
{ the pointer to the following instruction }
|
||||||
{ isn't a very clean way }
|
{ isn't a very clean way }
|
||||||
tlabelnode(p).left:=statement{$ifdef FPCPROCVAR}(){$endif};
|
if token in endtokens then
|
||||||
|
tlabelnode(p).left:=cnothingnode.create
|
||||||
|
else
|
||||||
|
tlabelnode(p).left:=statement{$ifdef FPCPROCVAR}(){$endif};
|
||||||
{ be sure to have left also resulttypepass }
|
{ be sure to have left also resulttypepass }
|
||||||
resulttypepass(tlabelnode(p).left);
|
resulttypepass(tlabelnode(p).left);
|
||||||
end;
|
end;
|
||||||
@ -1084,7 +1087,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.125 2004-01-12 16:36:53 peter
|
Revision 1.126 2004-01-22 17:24:49 peter
|
||||||
|
* except is also an end of block token
|
||||||
|
* after a label don't try to parse a statement when the next token
|
||||||
|
is an end token
|
||||||
|
|
||||||
|
Revision 1.125 2004/01/12 16:36:53 peter
|
||||||
* removed asmmode_direct
|
* removed asmmode_direct
|
||||||
|
|
||||||
Revision 1.124 2003/12/07 16:40:45 jonas
|
Revision 1.124 2003/12/07 16:40:45 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user