aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-07-11 11:46:21 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2021-07-11 11:46:21 +0200
commit49c3ce64f092fd5434fc67056f312bd32f82bae3 (patch)
treecd63b15baf893803970746e771fc7c4a41a1bb90
parente2e3802987266c98df0efdf40ad5da4b07df0113 (diff)
downloadbusybox-w32-49c3ce64f092fd5434fc67056f312bd32f82bae3.tar.gz
busybox-w32-49c3ce64f092fd5434fc67056f312bd32f82bae3.tar.bz2
busybox-w32-49c3ce64f092fd5434fc67056f312bd32f82bae3.zip
awk: rollback_token() + chain_group() == chain_until_rbrace()
function old new delta parse_program 336 332 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--editors/awk.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/editors/awk.c b/editors/awk.c
index a440a6234..755e68fc7 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -1778,8 +1778,7 @@ static void parse_program(char *p)
1778 cn->l.n = parse_expr(TC_SEMICOL | TC_NEWLINE | TC_EOF | TC_LBRACE); 1778 cn->l.n = parse_expr(TC_SEMICOL | TC_NEWLINE | TC_EOF | TC_LBRACE);
1779 if (t_tclass == TC_LBRACE) { 1779 if (t_tclass == TC_LBRACE) {
1780 debug_printf_parse("%s: TC_LBRACE\n", __func__); 1780 debug_printf_parse("%s: TC_LBRACE\n", __func__);
1781 rollback_token(); 1781 chain_until_rbrace();
1782 chain_group();
1783 } else { 1782 } else {
1784 /* no action, assume default "{ print }" */ 1783 /* no action, assume default "{ print }" */
1785 debug_printf_parse("%s: !TC_LBRACE\n", __func__); 1784 debug_printf_parse("%s: !TC_LBRACE\n", __func__);