From 38730b344f7027fa89097ca660300802842a18aa Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 21 Feb 2016 12:19:00 -0500 Subject: eshtrans/frontend: Don't eat char after wordexp in arithmetic Before: Trying script: $(($foo + 1)) Tokens: T_FNAME$(($foo+ 1))T_NEWLINET_EOF Token: function name "$(($foo+ 1))" Token: newline Token: end of file Generated code: $(($foo+ 1)) Trying script: $((1 + $foo)) stdin:1: Syntax error: Arithmetic expansion: ")" unexpected FAIL After: Trying script: $(($foo + 1)) Tokens: T_FNAME$(($foo + 1))T_NEWLINET_EOF Token: function name "$(($foo + 1))" Token: newline Token: end of file Generated code: $(($foo + 1)) Trying script: $((1 + $foo)) Tokens: T_FNAME$((1 + $foo))T_NEWLINET_EOF Token: function name "$((1 + $foo))" Token: newline Token: end of file Generated code: $((1 + $foo)) --- (limited to 'parsing/parse.sh') -- cgit v0.9.1