awk: fix parsing of expressions such as "v (a)"

function                                             old     new   delta
next_token                                           812     825     +13

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2021-06-29 12:16:36 +02:00
parent 686287b5da
commit 6872c193a9
2 changed files with 29 additions and 4 deletions

View File

@@ -71,6 +71,17 @@ testing "awk properly handles undefined function" \
"L1\n\nawk: cmd. line:5: Call to undefined function\n" \
"" ""
prg='
BEGIN {
v=1
a=2
print v (a)
}'
testing "'v (a)' is not a function call, it is a concatenation" \
"awk '$prg' 2>&1" \
"12\n" \
"" ""
optional DESKTOP
testing "awk hex const 1" "awk '{ print or(0xffffffff,1) }'" "4294967295\n" "" "\n"