mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
feat: add re2c
This commit is contained in:
parent
05fe2c38a3
commit
c58694685d
11 changed files with 245 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
((comment) @injection.content
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
(call_expression
|
||||
|
|
@ -11,10 +11,14 @@
|
|||
"regexp.MustCompile"
|
||||
"regexp.MustCompilePOSIX")
|
||||
(argument_list
|
||||
.
|
||||
.
|
||||
[
|
||||
(raw_string_literal)
|
||||
(raw_string_literal)
|
||||
(interpreted_string_literal)
|
||||
] @injection.content
|
||||
(#offset! @injection.content 0 1 0 -1)
|
||||
(#set! injection.language "regex")))
|
||||
|
||||
((comment) @injection.content
|
||||
(#match? @injection.content "/\*!([a-zA-Z]+:)?re2c")
|
||||
(#set! injection.language "re2c"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue