diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-02-21 12:19:00 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-02-21 12:21:44 (EST) |
commit | 38730b344f7027fa89097ca660300802842a18aa (patch) | |
tree | d26a177d24bfd92e69a5085e7c32029d950d83fd /parsing/parse.sh | |
parent | 506a0723291b4abc4b707a6353a840ef51f95ee8 (diff) | |
download | eggshell-38730b344f7027fa89097ca660300802842a18aa.zip eggshell-38730b344f7027fa89097ca660300802842a18aa.tar.gz eggshell-38730b344f7027fa89097ca660300802842a18aa.tar.bz2 |
eshtrans/frontend: Don't eat char after wordexp in arithmetic
Before:
Trying script:
$(($foo + 1))
Tokens: T_FNAME<US>$(($foo+ 1))<RS>T_NEWLINE<RS>T_EOF<RS>
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<US>$(($foo + 1))<RS>T_NEWLINE<RS>T_EOF<RS>
Token: function name
"$(($foo + 1))"
Token: newline
Token: end of file
Generated code:
$(($foo + 1))
Trying script:
$((1 + $foo))
Tokens: T_FNAME<US>$((1 + $foo))<RS>T_NEWLINE<RS>T_EOF<RS>
Token: function name
"$((1 + $foo))"
Token: newline
Token: end of file
Generated code:
$((1 + $foo))
Diffstat (limited to 'parsing/parse.sh')
0 files changed, 0 insertions, 0 deletions