2023-04-27 04:25:19 -04:00
|
|
|
((function_call
|
2024-03-21 20:44:35 +09:00
|
|
|
name: [
|
|
|
|
|
(identifier) @_cdef_identifier
|
|
|
|
|
(_
|
|
|
|
|
_
|
|
|
|
|
(identifier) @_cdef_identifier)
|
|
|
|
|
]
|
|
|
|
|
arguments: (arguments
|
|
|
|
|
(string
|
|
|
|
|
content: _ @injection.content)))
|
2023-05-03 19:07:59 +09:00
|
|
|
(#eq? @_cdef_identifier "cdef")
|
|
|
|
|
(#set! injection.language "c"))
|
2023-04-27 04:25:19 -04:00
|
|
|
|
2023-05-03 19:07:59 +09:00
|
|
|
((comment) @injection.content
|
|
|
|
|
(#lua-match? @injection.content "[-][-][-][%s]*@")
|
|
|
|
|
(#offset! @injection.content 0 3 0 0)
|
|
|
|
|
(#set! injection.language "luadoc"))
|
2023-04-27 04:25:19 -04:00
|
|
|
|
|
|
|
|
; string.match("123", "%d+")
|
|
|
|
|
(function_call
|
|
|
|
|
(dot_index_expression
|
|
|
|
|
field: (identifier) @_method
|
2023-12-23 13:01:41 -08:00
|
|
|
(#any-of? @_method "find" "format" "match" "gmatch" "gsub"))
|
2024-03-21 20:44:35 +09:00
|
|
|
arguments: (arguments
|
|
|
|
|
.
|
|
|
|
|
(_)
|
|
|
|
|
.
|
|
|
|
|
(string
|
|
|
|
|
content: _ @injection.content))
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! injection.language "luap"))
|
2023-04-27 04:25:19 -04:00
|
|
|
|
|
|
|
|
; ("123"):match("%d+")
|
|
|
|
|
(function_call
|
|
|
|
|
(method_index_expression
|
|
|
|
|
method: (identifier) @_method
|
2023-12-23 13:01:41 -08:00
|
|
|
(#any-of? @_method "find" "format" "match" "gmatch" "gsub"))
|
2024-03-21 20:44:35 +09:00
|
|
|
arguments: (arguments
|
|
|
|
|
.
|
|
|
|
|
(string
|
|
|
|
|
content: _ @injection.content))
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! injection.language "luap"))
|
2023-04-27 04:25:19 -04:00
|
|
|
|
2023-05-03 19:07:59 +09:00
|
|
|
((comment) @injection.content
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! injection.language "comment"))
|