mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
injections(rust): inject regex into Regex::new
This commit is contained in:
parent
7474cb06c2
commit
225cac5e6b
1 changed files with 13 additions and 0 deletions
|
|
@ -19,3 +19,16 @@
|
|||
(#eq? @_html_def "html")
|
||||
)
|
||||
|
||||
(call_expression
|
||||
function: (scoped_identifier
|
||||
path: (identifier) @_regex (#eq? @_regex "Regex")
|
||||
name: (identifier) @_new (#eq? @_new "new"))
|
||||
arguments: (arguments
|
||||
(raw_string_literal) @regex))
|
||||
|
||||
(call_expression
|
||||
function: (scoped_identifier
|
||||
path: (scoped_identifier (identifier) @_regex (#eq? @_regex "Regex").)
|
||||
name: (identifier) @_new (#eq? @_new "new"))
|
||||
arguments: (arguments
|
||||
(raw_string_literal) @regex))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue