2023-05-03 19:07:59 +09:00
|
|
|
([
|
2023-02-23 17:04:07 -05:00
|
|
|
(block_comment)
|
|
|
|
|
(line_comment)
|
2024-01-06 15:05:50 +09:00
|
|
|
] @injection.content
|
|
|
|
|
(#set! injection.language "comment"))
|
2023-08-25 05:02:58 -04:00
|
|
|
|
|
|
|
|
((block_comment) @injection.content
|
|
|
|
|
(#lua-match? @injection.content "/[*][!<*][^a-zA-Z]")
|
|
|
|
|
(#set! injection.language "doxygen"))
|
2023-08-19 19:28:45 +03:00
|
|
|
|
2025-02-08 23:50:26 -05:00
|
|
|
; markdown-style javadocs: https://openjdk.org/jeps/467
|
|
|
|
|
((line_comment) @injection.content
|
|
|
|
|
(#lua-match? @injection.content "^///%s")
|
|
|
|
|
(#offset! @injection.content 0 4 0 0)
|
|
|
|
|
(#set! injection.language "markdown_inline"))
|
|
|
|
|
|
|
|
|
|
; markdown-style javadocs: https://openjdk.org/jeps/467
|
|
|
|
|
((line_comment) @injection.content
|
|
|
|
|
(#lua-match? @injection.content "^///%s+[@]")
|
|
|
|
|
(#offset! @injection.content 0 4 0 0)
|
|
|
|
|
(#set! injection.language "doxygen"))
|
|
|
|
|
|
2023-08-19 19:28:45 +03:00
|
|
|
((method_invocation
|
|
|
|
|
name: (identifier) @_method
|
2024-03-21 20:44:35 +09:00
|
|
|
arguments: (argument_list
|
|
|
|
|
.
|
|
|
|
|
(string_literal
|
2024-01-06 15:05:50 +09:00
|
|
|
.
|
2024-03-21 20:44:35 +09:00
|
|
|
(_) @injection.content)))
|
2024-01-06 15:05:50 +09:00
|
|
|
(#any-of? @_method "format" "printf")
|
|
|
|
|
(#set! injection.language "printf"))
|
2024-02-02 22:00:03 +03:00
|
|
|
|
|
|
|
|
((method_invocation
|
2024-03-21 20:44:35 +09:00
|
|
|
object: (string_literal
|
|
|
|
|
(string_fragment) @injection.content)
|
2024-02-02 22:00:03 +03:00
|
|
|
name: (identifier) @_method)
|
|
|
|
|
(#eq? @_method "formatted")
|
|
|
|
|
(#set! injection.language "printf"))
|