diff options
Diffstat (limited to 'bashast/gunit/array.gunit')
-rw-r--r-- | bashast/gunit/array.gunit | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bashast/gunit/array.gunit b/bashast/gunit/array.gunit index 514eb53..ddfdfeb 100644 --- a/bashast/gunit/array.gunit +++ b/bashast/gunit/array.gunit @@ -36,22 +36,22 @@ builtin_variable_definitions: variable_reference: "$asdf" -> (VAR_REF asdf) -"${asdf[0]:-default}" -> (VAR_REF (USE_DEFAULT_WHEN_UNSET_OR_NULL (asdf 0) (STRING default))) -"${asdf[3]}" -> (VAR_REF (asdf 3)) -"${asdf[4] }" -> (VAR_REF (asdf 4)) -"${asdf[i*2]}" -> (VAR_REF (asdf (* (VAR_REF i) 2))) -"${asdf[1]:2:2}" -> (VAR_REF (OFFSET (asdf 1) 2 2)) -"${asdf[2]##word}" -> (VAR_REF (REPLACE_AT_START (asdf 2) (STRING word))) -"${asdf[3]%%word}" -> (VAR_REF (REPLACE_AT_END (asdf 3) (STRING word))) -"${asdf[4]//pattern}" -> (VAR_REF (REPLACE_ALL (asdf 4) (STRING pattern))) +"${asdf[0]:-default}" -> (VAR_REF (USE_DEFAULT_WHEN_UNSET_OR_NULL (asdf (ARITHMETIC 0)) (STRING default))) +"${asdf[3]}" -> (VAR_REF (asdf (ARITHMETIC 3))) +"${asdf[4] }" -> (VAR_REF (asdf (ARITHMETIC 4))) +"${asdf[i*2]}" -> (VAR_REF (asdf (ARITHMETIC (* (VAR_REF i) 2)))) +"${asdf[1]:2:2}" -> (VAR_REF (OFFSET (asdf (ARITHMETIC 1)) (OFFSET (ARITHMETIC 2)) (OFFSET (ARITHMETIC 2)))) +"${asdf[2]##word}" -> (VAR_REF (REPLACE_AT_START (asdf (ARITHMETIC 2)) (STRING word))) +"${asdf[3]%%word}" -> (VAR_REF (REPLACE_AT_END (asdf (ARITHMETIC 3)) (STRING word))) +"${asdf[4]//pattern}" -> (VAR_REF (REPLACE_ALL (asdf (ARITHMETIC 4)) (STRING pattern))) "${asdf}" -> (VAR_REF asdf) "${#asdf[0]}" -> (VAR_REF (# (asdf 0))) -"${#asdf[ $i ]}" -> (VAR_REF (# (asdf (VAR_REF i)))) +"${#asdf[ $i ]}" -> (VAR_REF (# (asdf (ARITHMETIC (VAR_REF i))))) "${asdf[@]}" -> (VAR_REF (ARRAY asdf @)) "${asdf[*]}" -> (VAR_REF (ARRAY asdf *)) "${#asdf[@]}" -> (VAR_REF (# (asdf ARRAY_SIZE))) "${#asdf[*]}" -> (VAR_REF (# (asdf ARRAY_SIZE))) -"${asdf[@]:0:1}" -> (VAR_REF (OFFSET (ARRAY asdf @) 0 1)) +"${asdf[@]:0:1}" -> (VAR_REF (OFFSET (ARRAY asdf @) (OFFSET (ARITHMETIC 0)) (OFFSET (ARITHMETIC 1)))) "${asdf[*]#path}" -> (VAR_REF (LAZY_REMOVE_AT_START (ARRAY asdf *) (STRING path))) "${asdf[@]%word}" -> (VAR_REF (LAZY_REMOVE_AT_END (ARRAY asdf @) (STRING word))) "${asdf[*]/pattern/string}" -> (VAR_REF (REPLACE_FIRST (ARRAY asdf *) (STRING pattern) (STRING string))) |