mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 12:50:09 -04:00
feat(haskell) injections for inline-c-cpp quasiquotes
This commit is contained in:
parent
42fc28ba91
commit
38424abffb
1 changed files with 15 additions and 0 deletions
|
|
@ -82,3 +82,18 @@
|
|||
(quoter) @injection.language
|
||||
(#any-of? @injection.language "pymain" "pye" "py_" "pyf")
|
||||
(quasiquote_body) @injection.content)
|
||||
|
||||
; -----------------------------------------------------------------------------
|
||||
; CPP
|
||||
; inline-c-cpp
|
||||
((quasiquote
|
||||
(quoter
|
||||
(qualified
|
||||
module: (module (module_id) @_module)
|
||||
id: (variable) @_id))
|
||||
body: (quasiquote_body) @injection.content)
|
||||
(#eq? @_module "C")
|
||||
(#any-of? @_id "exp" "block")
|
||||
(#set! injection.language "cpp")
|
||||
(#set! injection.include-children)
|
||||
(#set! injection.pattern "^\\$[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*$"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue