2023-05-03 19:07:59 +09:00
|
|
|
((comment) @injection.content (#set! injection.language "comment"))
|
2022-09-20 02:03:08 +03:00
|
|
|
|
|
|
|
|
; test(val)
|
|
|
|
|
(query
|
|
|
|
|
((funcname) @_function
|
|
|
|
|
(#any-of? @_function
|
|
|
|
|
"test"
|
|
|
|
|
"match"
|
|
|
|
|
"capture"
|
|
|
|
|
"scan"
|
|
|
|
|
"split"
|
|
|
|
|
"splits"
|
|
|
|
|
"sub"
|
|
|
|
|
"gsub"))
|
2023-05-03 19:07:59 +09:00
|
|
|
(args .
|
|
|
|
|
(query
|
|
|
|
|
(string) @injection.content
|
|
|
|
|
(#set! injection.language "regex"))))
|
2022-09-20 02:03:08 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
; test(regex; flags)
|
|
|
|
|
(query
|
|
|
|
|
((funcname) @_function
|
|
|
|
|
(#any-of? @_function
|
|
|
|
|
"test"
|
|
|
|
|
"match"
|
|
|
|
|
"capture"
|
|
|
|
|
"scan"
|
|
|
|
|
"split"
|
|
|
|
|
"splits"
|
|
|
|
|
"sub"
|
|
|
|
|
"gsub"))
|
|
|
|
|
(args . (args
|
2023-05-03 19:07:59 +09:00
|
|
|
(query
|
|
|
|
|
(string) @injection.content
|
|
|
|
|
(#set! injection.language "regex")))))
|