2023-08-22 02:10:29 -04:00
|
|
|
((comment) @injection.content
|
2023-05-03 19:07:59 +09:00
|
|
|
(#set! injection.language "comment"))
|
2022-11-28 23:29:45 +01:00
|
|
|
|
|
|
|
|
(call_expression
|
|
|
|
|
(selector_expression) @_function (#any-of? @_function
|
|
|
|
|
"regexp.Match"
|
|
|
|
|
"regexp.MatchReader"
|
|
|
|
|
"regexp.MatchString"
|
|
|
|
|
"regexp.Compile"
|
|
|
|
|
"regexp.CompilePOSIX"
|
|
|
|
|
"regexp.MustCompile"
|
|
|
|
|
"regexp.MustCompilePOSIX")
|
|
|
|
|
(argument_list
|
2023-08-22 02:10:29 -04:00
|
|
|
.
|
2023-05-03 19:07:59 +09:00
|
|
|
[
|
2023-08-22 02:10:29 -04:00
|
|
|
(raw_string_literal)
|
2023-05-03 19:07:59 +09:00
|
|
|
(interpreted_string_literal)
|
|
|
|
|
] @injection.content
|
|
|
|
|
(#offset! @injection.content 0 1 0 -1)
|
|
|
|
|
(#set! injection.language "regex")))
|
2023-08-22 02:10:29 -04:00
|
|
|
|
|
|
|
|
((comment) @injection.content
|
2023-08-25 05:02:58 -04:00
|
|
|
(#match? @injection.content "/\\*!([a-zA-Z]+:)?re2c")
|
2023-08-22 02:10:29 -04:00
|
|
|
(#set! injection.language "re2c"))
|