mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
feat(kdl): parser and queries (#7657)
This commit is contained in:
parent
28f76678ca
commit
376a46ccec
5 changed files with 248 additions and 0 deletions
26
queries/kcl/injections.scm
Normal file
26
queries/kcl/injections.scm
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
(call_expr
|
||||
function: (selector_expr
|
||||
(identifier) @_regex)
|
||||
arguments: (argument_list
|
||||
(_)
|
||||
.
|
||||
(string
|
||||
(string_content) @injection.content))
|
||||
(#eq? @_regex "regex")
|
||||
(#set! injection.language "regex"))
|
||||
|
||||
(call_expr
|
||||
function: (selector_expr
|
||||
(identifier) @_regex
|
||||
(select_suffix
|
||||
(identifier) @_fn
|
||||
(#eq? @_fn "compile")))
|
||||
arguments: (argument_list
|
||||
.
|
||||
(string
|
||||
(string_content) @injection.content))
|
||||
(#eq? @_regex "regex")
|
||||
(#set! injection.language "regex"))
|
||||
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue