2023-05-03 19:07:59 +09:00
|
|
|
((comment) @injection.content
|
|
|
|
|
(#set! injection.language "comment"))
|
2022-02-22 17:36:44 +03:00
|
|
|
;; asm_statement if asm ever highlighted :)
|
|
|
|
|
|
|
|
|
|
;; #include <...>
|
2023-05-03 19:07:59 +09:00
|
|
|
((hash_statement) @injection.content
|
|
|
|
|
(#set! injection.language "c"))
|
2022-02-22 17:36:44 +03:00
|
|
|
|
2023-03-03 18:55:49 +01:00
|
|
|
;; regex for the methods defined in `re` module
|
|
|
|
|
((call_expression
|
2023-07-04 04:12:21 -04:00
|
|
|
name: (selector_expression
|
|
|
|
|
field: (reference_expression (identifier) @_re))
|
2023-03-03 18:55:49 +01:00
|
|
|
arguments: (argument_list
|
2023-05-03 19:07:59 +09:00
|
|
|
(argument (literal (raw_string_literal) @injection.content
|
|
|
|
|
(#offset! @injection.content 0 2 0 -1)))))
|
|
|
|
|
(#any-of? @_re "regex_base" "regex_opt" "compile_opt")
|
|
|
|
|
(#set! injection.language "regex"))
|