injections(rust): inject regex into Regex::new

This commit is contained in:
Stephan Seitz 2021-12-13 20:59:19 +01:00 committed by Thomas Vigouroux
parent 7474cb06c2
commit 225cac5e6b

View file

@ -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))