mirror of
https://github.com/neovim/neovim.git
synced 2024-12-21 03:35:02 -07:00
7c95697026
For the case of Clojure and other Lisp syntax highlighting, it is necessary to create huge regexps consisting of hundreds of symbols with the pipe (|) character. To make things more difficult, these Lisp symbols sometimes consists of special characters that are themselves part of special regexp characters like '*'. In addition to being difficult to maintain, it's performance is suboptimal. This patch introduces a new predicate to perform 'source' matching in amortized constant time. This is accomplished by compiling a hash table on the first use. |
||
---|---|---|
.. | ||
highlight_spec.lua | ||
language_spec.lua | ||
parser_spec.lua |