get rid of captures

pull/436/head
romkatv 5 years ago
parent 6e3711759f
commit 770bf93444

@ -145,11 +145,16 @@ function _parse_buffer() {
local -r id='(<->|[[:alpha:]_][[:IDENT:]]#)'
local -r var="\$$id|\${$id}|\"\$$id\"|\"\${$id}\""
local -i e c=32
local -i e ic c=1024
local skip n s r state
local -a aln alp alf v commands match mbegin mend
local -a aln alp alf v commands
[[ -o interactive_comments ]] && local tokens=(${(Z+C+)1}) || local tokens=(${(z)1})
if [[ -o interactive_comments ]]; then
ic=1
local tokens=(${(Z+C+)1})
else
local tokens=(${(z)1})
fi
() {
while (( $#tokens )); do
@ -171,25 +176,26 @@ function _parse_buffer() {
tokens[1]=()
if (( $+galiases[$token] )); then
(( $aln[(eI)p$token] )) && break
n=p$token
s=$galiases[$token]
n=p$token
elif (( e )); then
break
elif (( $+aliases[$token] )); then
(( $aln[(eI)p$token] )) && break
n=p$token
s=$aliases[$token]
elif [[ $token == (#b)?*.(?*) ]] && (( $+saliases[$match[1]] )); then
(( $aln[(eI)s$match[1]] )) && break
n=s$match[1]
s=${saliases[$match[1]]%% #}
n=p$token
elif [[ $token == ?*.?* ]] && (( $+saliases[${token##*.}] )); then
r=${token##*.}
(( $aln[(eI)s$r] )) && break
s=${saliases[$r]%% #}
n=s$r
else
break
fi
aln+=$n
alp+=$#tokens
[[ $s == *' ' ]] && alf+=$#tokens
[[ -o interactive_comments ]] && tokens[1,0]=(${(Z+C+)s}) || tokens[1,0]=(${(z)s})
(( ic )) && tokens[1,0]=(${(Z+C+)s}) || tokens[1,0]=(${(z)s})
done
case $state in

Loading…
Cancel
Save