diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-07-02 14:29:01 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-07-02 14:29:01 +0200 |
commit | 1193c68fa718ff16c47aba23f8532bf1568f294e (patch) | |
tree | f16838282d43ddc0e7824b1abfa77c90f4112f94 | |
parent | 40573556f2a67b11319785e0479b7087d02c060e (diff) | |
download | busybox-w32-1193c68fa718ff16c47aba23f8532bf1568f294e.tar.gz busybox-w32-1193c68fa718ff16c47aba23f8532bf1568f294e.tar.bz2 busybox-w32-1193c68fa718ff16c47aba23f8532bf1568f294e.zip |
awk: when parsing length(), simplify eating of LPAREN
function old new delta
parse_expr 945 948 +3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | editors/awk.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/editors/awk.c b/editors/awk.c index 6833c2f0d..f65449a09 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -1453,10 +1453,11 @@ static node *parse_expr(uint32_t term_tc) | |||
1453 | | TC_BINOPX /* length <op> NUM */ | 1453 | | TC_BINOPX /* length <op> NUM */ |
1454 | | TC_COMMA /* print length, 1 */ | 1454 | | TC_COMMA /* print length, 1 */ |
1455 | ); | 1455 | ); |
1456 | rollback_token(); | 1456 | if (tc != TC_LPAREN) |
1457 | if (tc & TC_LPAREN) { | 1457 | rollback_token(); |
1458 | else { | ||
1458 | /* It was a "(" token. Handle just like TC_BUILTIN */ | 1459 | /* It was a "(" token. Handle just like TC_BUILTIN */ |
1459 | cn->l.n = parse_lrparen_list(); | 1460 | cn->l.n = parse_expr(TC_RPAREN); |
1460 | } | 1461 | } |
1461 | break; | 1462 | break; |
1462 | } | 1463 | } |