diff options
author | Raymond W. Ko <raymond.w.ko@gmail.com> | 2021-05-14 11:41:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 17:41:20 +0200 |
commit | 7c95697026e76f9ee817cbea5ab11232a2443c15 (patch) | |
tree | e0d8dbea5cd65dca635ec75ec5a550b4e12d20bb /runtime/lua/vim/lsp/util.lua | |
parent | 61aefaf2993c0b55f6123ba4b0bd41b1caf1fcd3 (diff) | |
download | rneovim-7c95697026e76f9ee817cbea5ab11232a2443c15.tar.gz rneovim-7c95697026e76f9ee817cbea5ab11232a2443c15.tar.bz2 rneovim-7c95697026e76f9ee817cbea5ab11232a2443c15.zip |
treesitter: add predicate "any-of?" (#14344)
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.
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
0 files changed, 0 insertions, 0 deletions