diff --git a/hsmw-highlight b/hsmw-highlight index f80db4d..66a42dd 100644 --- a/hsmw-highlight +++ b/hsmw-highlight @@ -160,7 +160,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=( -hsmw-highlight-stack-pop() { if [[ $braces_stack[1] == $1 ]]; then braces_stack=${braces_stack:1} - eval "$2" + style=reserved-word else style=unknown-token fi @@ -421,7 +421,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=( braces_stack='Y'"$braces_stack" elif [[ $arg == $'\x7d' ]]; then # We're at command word, so no need to check $right_brace_is_recognised_everywhere - -hsmw-highlight-stack-pop 'Y' style=reserved-word + -hsmw-highlight-stack-pop 'Y' [[ $style == "reserved-word" ]] && (( next_word = next_word | 16 )) fi ;; @@ -514,7 +514,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=( in_array_assignment=0 (( next_word = next_word | 1 )) else - -hsmw-highlight-stack-pop 'R' style=reserved-word + -hsmw-highlight-stack-pop 'R' fi;; $'\x28\x29') # possibly a function definition # || false # TODO: or if the previous word was a command word @@ -528,7 +528,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=( # Additionally, `tt(})' is recognized in any position if neither the # tt(IGNORE_BRACES) option nor the tt(IGNORE_CLOSE_BRACES) option is set.""" if (( right_brace_is_recognised_everywhere )); then - -hsmw-highlight-stack-pop 'Y' style=reserved-word + -hsmw-highlight-stack-pop 'Y' [[ $style == reserved-word ]] && (( next_word = next_word | 16 )) #else # Fall through to the catchall case at the end.