diff --git a/ble-core.sh b/ble-core.sh index ddb92998..00eff47a 100755 --- a/ble-core.sh +++ b/ble-core.sh @@ -195,6 +195,14 @@ function ble/util/array-reverse { " } +function ble/util/array-fill-range { + _ble_util_array_prototype.reserve $(($2-$1)) + local _ble_script=' + local -a sARR; sARR=("${_ble_util_array_prototype[@]::$3-$2}") + ARR=("${ARR[@]::$2}" "${sARR[@]/#/$4}" "${ARR[@]:$3}")' + builtin eval -- "${_ble_script//ARR/$1}" +} + function ble/util/declare-print-definitions { if [[ $# -gt 0 ]]; then declare -p "$@" | awk -v _ble_bash="$_ble_bash" -v OSTYPE="$OSTYPE" ' diff --git a/ble-syntax.sh b/ble-syntax.sh index 0b66d1f7..9ef0d64f 100755 --- a/ble-syntax.sh +++ b/ble-syntax.sh @@ -1920,7 +1920,7 @@ function ble-syntax/parse { ((0<=i1&&i1<=beg&&end<=i2&&i2<=iN)) || ble-stackdump "X2 0 <= $i1 <= $beg <= $end <= $i2 <= $iN" #%end - ble-syntax/vanishing-word/register _ble_syntax_tree 0 i1 j2 0 i1 + ble-syntax/vanishing-word/register _ble_syntax_tree 0 "$i1" "$j2" 0 "$i2" ble-syntax/parse/shift @@ -2602,9 +2602,9 @@ function ble-highlight-layer:syntax/word/.apply-attribute { wbeg