aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/ruby/injections.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/ruby/injections.scm')
-rw-r--r--runtime/queries/ruby/injections.scm23
1 files changed, 23 insertions, 0 deletions
diff --git a/runtime/queries/ruby/injections.scm b/runtime/queries/ruby/injections.scm
new file mode 100644
index 000000000..12b2c32a5
--- /dev/null
+++ b/runtime/queries/ruby/injections.scm
@@ -0,0 +1,23 @@
+((comment) @injection.content
+ (#set! injection.language "comment"))
+
+(heredoc_body
+ (heredoc_content) @injection.content
+ (heredoc_end) @injection.language
+ (#downcase! @injection.language))
+
+(regex
+ (string_content) @injection.content
+ (#set! injection.language "regex"))
+
+((call
+ receiver: (identifier) @_receiver
+ method: (identifier) @_method
+ arguments: (argument_list
+ (pair
+ key: (hash_key_symbol)
+ value: (string
+ (string_content) @injection.content))))
+ (#eq? @_receiver "binding")
+ (#any-of? @_method "b" "break")
+ (#set! injection.self))