mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
refactor(python): update regex injection to use injection.combined
This commit is contained in:
parent
0dc9eaaa4e
commit
ddcf1ae900
1 changed files with 13 additions and 16 deletions
|
|
@ -1,23 +1,20 @@
|
||||||
(call
|
(call
|
||||||
function: (attribute
|
function: (attribute
|
||||||
object: (identifier) @_re)
|
object: (identifier) @_re)
|
||||||
arguments: (argument_list
|
arguments: [
|
||||||
.
|
(argument_list
|
||||||
(string
|
.
|
||||||
(string_content) @injection.content))
|
|
||||||
(#eq? @_re "re")
|
|
||||||
(#set! injection.language "regex"))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (attribute
|
|
||||||
object: (identifier) @_re)
|
|
||||||
arguments: (argument_list
|
|
||||||
.
|
|
||||||
(concatenated_string
|
|
||||||
(string
|
(string
|
||||||
(string_content) @injection.content))
|
(string_content) @injection.content)
|
||||||
(#eq? @_re "re")
|
(#set! injection.language "regex"))
|
||||||
(#set! injection.language "regex")))
|
(argument_list
|
||||||
|
.
|
||||||
|
(concatenated_string
|
||||||
|
(string
|
||||||
|
(string_content) @injection.content)))
|
||||||
|
]
|
||||||
|
(#eq? @_re "re")
|
||||||
|
(#set! injection.combined))
|
||||||
|
|
||||||
((binary_operator
|
((binary_operator
|
||||||
left: (string
|
left: (string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue