diff options
author | Mu Qiao <qiaomuf@gentoo.org> | 2011-07-21 17:08:33 +0800 |
---|---|---|
committer | Mu Qiao <qiaomuf@gentoo.org> | 2011-08-02 15:46:29 +0800 |
commit | c5a116f1794e061ea10335b12c6889676d92136b (patch) | |
tree | f4fa085fea6888429805ba2d9db1513b7ab73540 /bashast/gunit | |
parent | Parser: allow braces in command arguments (diff) | |
download | libbash-c5a116f1794e061ea10335b12c6889676d92136b.tar.gz libbash-c5a116f1794e061ea10335b12c6889676d92136b.tar.bz2 libbash-c5a116f1794e061ea10335b12c6889676d92136b.zip |
Parser: allow empty value for sub-array expansion
Expansion like ${var::3} is allowed now.
Diffstat (limited to 'bashast/gunit')
-rw-r--r-- | bashast/gunit/param_main.gunit | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bashast/gunit/param_main.gunit b/bashast/gunit/param_main.gunit index 677b566..306d3c6 100644 --- a/bashast/gunit/param_main.gunit +++ b/bashast/gunit/param_main.gunit @@ -29,6 +29,7 @@ variable_reference: "${bar: -10}" -> (VAR_REF (OFFSET bar (MINUS_SIGN 10))) "${bar:(-10 + 5)}" -> (VAR_REF (OFFSET bar (+ (MINUS_SIGN 10) 5))) "${foo:5:2}" -> (VAR_REF (OFFSET foo 5 2)) +"${foo::2}" -> (VAR_REF (OFFSET foo 0 2)) "${foo:$((5)):$((2))}" -> (VAR_REF (OFFSET foo 5 2)) "${!asdf*}" -> (VAR_REF (! asdf *)) "${!asdf@}" -> (VAR_REF (! asdf @)) |