diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2021-12-13 20:59:19 +0100 |
|---|---|---|
| committer | Thomas Vigouroux <thomas.vigouroux@protonmail.com> | 2021-12-14 14:28:26 +0100 |
| commit | 225cac5e6b762bf5223d96df20d4b2ff658f5f34 (patch) | |
| tree | c5be790f16e6ca5b7a5fe6c001494cc0023cdef6 /queries | |
| parent | 7474cb06c2be750eae92da51ff7791deb3b21397 (diff) | |
injections(rust): inject regex into `Regex::new`
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/rust/injections.scm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/queries/rust/injections.scm b/queries/rust/injections.scm index bd88b7e3..fd19fbec 100644 --- a/queries/rust/injections.scm +++ b/queries/rust/injections.scm @@ -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)) |
