2024-01-06 15:05:50 +09:00
|
|
|
((comment) @injection.content
|
|
|
|
|
(#set! injection.language "comment"))
|
2022-11-26 14:27:21 +02:00
|
|
|
|
2023-08-23 13:02:41 +03:00
|
|
|
((regex) @injection.content
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! injection.language "regex"))
|
2023-08-11 15:24:48 +03:00
|
|
|
|
2023-08-23 13:02:41 +03:00
|
|
|
((heredoc_redirect
|
2023-08-26 05:06:54 -04:00
|
|
|
(heredoc_body) @injection.content
|
2023-08-23 13:02:41 +03:00
|
|
|
(heredoc_end) @injection.language)
|
2024-01-06 15:05:50 +09:00
|
|
|
(#downcase! @injection.language))
|
2023-08-19 19:28:45 +03:00
|
|
|
|
|
|
|
|
; printf 'format'
|
|
|
|
|
((command
|
|
|
|
|
name: (command_name) @_command
|
2024-01-06 15:05:50 +09:00
|
|
|
.
|
|
|
|
|
argument:
|
|
|
|
|
[
|
|
|
|
|
(string)
|
|
|
|
|
(raw_string)
|
|
|
|
|
] @injection.content)
|
|
|
|
|
(#eq? @_command "printf")
|
|
|
|
|
(#set! injection.language "printf"))
|
2023-08-19 19:28:45 +03:00
|
|
|
|
|
|
|
|
; printf -v var 'format'
|
|
|
|
|
((command
|
|
|
|
|
name: (command_name) @_command
|
|
|
|
|
argument: (word) @_arg
|
2024-01-06 15:05:50 +09:00
|
|
|
.
|
|
|
|
|
(_)
|
|
|
|
|
.
|
|
|
|
|
argument:
|
|
|
|
|
[
|
|
|
|
|
(string)
|
|
|
|
|
(raw_string)
|
|
|
|
|
] @injection.content)
|
|
|
|
|
(#eq? @_command "printf")
|
|
|
|
|
(#eq? @_arg "-v")
|
|
|
|
|
(#set! injection.language "printf"))
|
2023-08-19 19:28:45 +03:00
|
|
|
|
|
|
|
|
; printf -- 'format'
|
|
|
|
|
((command
|
|
|
|
|
name: (command_name) @_command
|
|
|
|
|
argument: (word) @_arg
|
2024-01-06 15:05:50 +09:00
|
|
|
.
|
|
|
|
|
argument:
|
|
|
|
|
[
|
|
|
|
|
(string)
|
|
|
|
|
(raw_string)
|
|
|
|
|
] @injection.content)
|
|
|
|
|
(#eq? @_command "printf")
|
|
|
|
|
(#eq? @_arg "--")
|
|
|
|
|
(#set! injection.language "printf"))
|