From aaf0d2c062eb68652c588efd6b00f60b247ef0a8 Mon Sep 17 00:00:00 2001 From: Ryszard Glab Date: Sun, 14 May 2000 12:47:34 +0000 Subject: [PATCH] ChangeLog 20000514-14:55 GMT+1 --- harbour/ChangeLog | 6 ++++++ harbour/source/compiler/harbour.y | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d07494697b..d0907c55d5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,9 @@ +20000514-14:55 GMT+1 Ryszard Glab + + *source/compiler/harbour.y + * fixed bug in line counting that was causing no code + generated for statements placed within BEGIN/END SEQUENCE + 20000513-14:50 GMT+1 Ryszard Glab *include/hbcomp.h diff --git a/harbour/source/compiler/harbour.y b/harbour/source/compiler/harbour.y index 9caba34fa7..909eb2e67d 100644 --- a/harbour/source/compiler/harbour.y +++ b/harbour/source/compiler/harbour.y @@ -1191,12 +1191,12 @@ IfEndif : IfBegin EndIf { hb_compGenJumpHere( $1 ); } | IfBegin IfElseIf IfElse EndIf { hb_compGenJumpHere( $1 ); hb_compElseIfFix( $2 ); } ; -EmptyStatements : LineStat { } - | EmptyStatements { hb_compLinePush(); } LineStat { } +EmptyStatements : LineStat { $$ = $1; } + | EmptyStatements { hb_compLinePush(); } LineStat { $$ += $3; } ; -EmptyStats : /* empty */ { hb_comp_bDontGenLineNum = TRUE; hb_comp_EOL = FALSE; } - | EmptyStatements { hb_comp_EOL = FALSE; } +EmptyStats : /* empty */ { hb_comp_bDontGenLineNum = TRUE; hb_comp_EOL = FALSE; $$ = 0; } + | EmptyStatements { hb_comp_EOL = FALSE; $$ = $1; } ; IfBegin : IF SimpleExpression { ++hb_comp_wIfCounter; hb_compLinePush(); } Crlf { hb_compExprDelete( hb_compExprGenPush( $2 ) ); $$ = hb_compGenJumpFalse( 0 ); hb_compLinePush(); }