diff options
Diffstat (limited to 'runtime/queries/rust/injections.scm')
-rw-r--r-- | runtime/queries/rust/injections.scm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/queries/rust/injections.scm b/runtime/queries/rust/injections.scm index d8382e49..77c70805 100644 --- a/runtime/queries/rust/injections.scm +++ b/runtime/queries/rust/injections.scm @@ -10,3 +10,17 @@ (token_tree) @injection.content) (#set! injection.language "rust") (#set! injection.include-children)) + +(call_expression + function: (scoped_identifier + path: (identifier) @_regex (#eq? @_regex "Regex") + name: (identifier) @_new (#eq? @_new "new")) + arguments: (arguments (raw_string_literal) @injection.content) + (#set! injection.language "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) @injection.content) + (#set! injection.language "regex")) |