*highlight: Optimization: eradicate impossible path

parse.zsh -oo, after changes:

Running time: 1.5890270000
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)  350        1581,38     4,52   99,99%   1218,92     3,48   77,07%  -hsmw-highlight-process
 2) 2800         286,76     0,10   18,13%    286,76     0,10   18,13%  -hsmw-highlight-string
 3) 1750          40,76     0,02    2,58%     40,76     0,02    2,58%  -hsmw-highlight-check-path
 4) 1400          24,90     0,02    1,57%     24,90     0,02    1,57%  -hsmw-highlight-main-type
 5)  350          10,04     0,03    0,63%     10,04     0,03    0,63%  -hsmw-highlight-stack-pop
 6)    1           0,08     0,08    0,00%      0,08     0,08    0,00%  -hsmw-highlight-fill-option-variables
 7)    1           0,02     0,02    0,00%      0,02     0,02    0,00%  -hsmw-highlight-init
This commit is contained in:
Sebastian Gniazdowski 2016-10-31 13:44:15 +01:00
parent bf306203f9
commit f34e89afa6

View file

@ -468,8 +468,6 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
# This highlights empty commands (semicolon follows nothing) as an error.
# Zsh accepts them, though.
(( this_word & 2 )) && style=commandseparator
elif (( in_redirection == 2 )); then
style=redirection
elif [[ $arg[1,2] == '((' ]]; then
# Arithmetic evaluation.
#