2023-05-03 19:07:59 +09:00
|
|
|
((comment) @injection.content
|
|
|
|
|
(#set! injection.language "comment"))
|
2022-11-23 12:32:02 -05:00
|
|
|
|
2022-11-23 14:14:31 -05:00
|
|
|
(apply_expression
|
|
|
|
|
function: (_) @_func
|
|
|
|
|
argument: [
|
2023-05-03 19:07:59 +09:00
|
|
|
(string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "regex")))
|
|
|
|
|
(indented_string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "regex")))
|
2022-11-23 14:14:31 -05:00
|
|
|
]
|
2023-05-03 19:07:59 +09:00
|
|
|
(#match? @_func "(^|\\.)match$")
|
|
|
|
|
(#set! injection.combined))
|
2022-11-23 14:14:31 -05:00
|
|
|
|
2022-11-23 12:32:02 -05:00
|
|
|
(binding
|
|
|
|
|
attrpath: (attrpath (identifier) @_path)
|
|
|
|
|
expression: [
|
2023-05-03 19:07:59 +09:00
|
|
|
(string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "bash")))
|
|
|
|
|
(indented_string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "bash")))
|
2022-11-23 12:32:02 -05:00
|
|
|
]
|
2023-01-04 15:47:45 -05:00
|
|
|
(#match? @_path "(^\\w+(Phase|Hook)|(pre|post)[A-Z]\\w+|script)$"))
|
2022-11-23 12:32:02 -05:00
|
|
|
|
|
|
|
|
(apply_expression
|
|
|
|
|
function: (_) @_func
|
|
|
|
|
argument: (_ (_)* (_ (_)* (binding
|
|
|
|
|
attrpath: (attrpath (identifier) @_path)
|
|
|
|
|
expression: [
|
2023-05-03 19:07:59 +09:00
|
|
|
(string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "bash")))
|
|
|
|
|
(indented_string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "bash")))
|
2022-11-23 12:32:02 -05:00
|
|
|
])))
|
|
|
|
|
(#match? @_func "(^|\\.)writeShellApplication$")
|
2023-05-03 19:07:59 +09:00
|
|
|
(#match? @_path "^text$")
|
|
|
|
|
(#set! injection.combined))
|
2022-11-23 12:32:02 -05:00
|
|
|
|
|
|
|
|
(apply_expression
|
2022-11-28 19:33:17 -05:00
|
|
|
function: (apply_expression
|
|
|
|
|
function: (apply_expression function: (_) @_func))
|
|
|
|
|
argument: [
|
2023-05-03 19:07:59 +09:00
|
|
|
(string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "bash")))
|
|
|
|
|
(indented_string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "bash")))
|
2022-11-28 19:33:17 -05:00
|
|
|
]
|
2023-05-03 19:07:59 +09:00
|
|
|
(#match? @_func "(^|\\.)runCommand((No)?CC)?(Local)?$")
|
|
|
|
|
(#set! injection.combined))
|
2022-11-23 12:32:02 -05:00
|
|
|
|
|
|
|
|
((apply_expression
|
|
|
|
|
function: (apply_expression function: (_) @_func)
|
|
|
|
|
argument: [
|
2023-05-03 19:07:59 +09:00
|
|
|
(string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "bash")))
|
|
|
|
|
(indented_string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "bash")))
|
2022-11-23 12:32:02 -05:00
|
|
|
])
|
2023-05-03 19:07:59 +09:00
|
|
|
(#match? @_func "(^|\\.)write(Bash|Dash|ShellScript)(Bin)?$")
|
|
|
|
|
(#set! injection.combined))
|
2022-11-23 12:32:02 -05:00
|
|
|
|
|
|
|
|
((apply_expression
|
|
|
|
|
function: (apply_expression function: (_) @_func)
|
|
|
|
|
argument: [
|
2023-05-03 19:07:59 +09:00
|
|
|
(string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "fish")))
|
|
|
|
|
(indented_string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "fish")))
|
2022-11-23 12:32:02 -05:00
|
|
|
])
|
2023-05-03 19:07:59 +09:00
|
|
|
(#match? @_func "(^|\\.)writeFish(Bin)?$")
|
|
|
|
|
(#set! injection.combined))
|
2022-11-23 12:32:02 -05:00
|
|
|
|
|
|
|
|
((apply_expression
|
|
|
|
|
function: (apply_expression
|
|
|
|
|
function: (apply_expression function: (_) @_func))
|
|
|
|
|
argument: [
|
2023-05-03 19:07:59 +09:00
|
|
|
(string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "haskell")))
|
|
|
|
|
(indented_string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "haskell")))
|
2022-11-23 12:32:02 -05:00
|
|
|
])
|
2023-05-03 19:07:59 +09:00
|
|
|
(#match? @_func "(^|\\.)writeHaskell(Bin)?$")
|
|
|
|
|
(#set! injection.combined))
|
2022-11-23 12:32:02 -05:00
|
|
|
|
|
|
|
|
((apply_expression
|
|
|
|
|
function: (apply_expression
|
|
|
|
|
function: (apply_expression function: (_) @_func))
|
|
|
|
|
argument: [
|
2023-05-03 19:07:59 +09:00
|
|
|
(string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "javascript")))
|
|
|
|
|
(indented_string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "javascript")))
|
2022-11-23 12:32:02 -05:00
|
|
|
])
|
2023-05-03 19:07:59 +09:00
|
|
|
(#match? @_func "(^|\\.)writeJS(Bin)?$")
|
|
|
|
|
(#set! injection.combined))
|
2022-11-23 12:32:02 -05:00
|
|
|
|
|
|
|
|
((apply_expression
|
|
|
|
|
function: (apply_expression
|
|
|
|
|
function: (apply_expression function: (_) @_func))
|
|
|
|
|
argument: [
|
2023-05-03 19:07:59 +09:00
|
|
|
(string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "perl")))
|
|
|
|
|
(indented_string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "perl")))
|
2022-11-23 12:32:02 -05:00
|
|
|
])
|
2023-05-03 19:07:59 +09:00
|
|
|
(#match? @_func "(^|\\.)writePerl(Bin)?$")
|
|
|
|
|
(#set! injection.combined))
|
2022-11-23 12:32:02 -05:00
|
|
|
|
|
|
|
|
((apply_expression
|
|
|
|
|
function: (apply_expression
|
|
|
|
|
function: (apply_expression function: (_) @_func))
|
|
|
|
|
argument: [
|
2023-05-03 19:07:59 +09:00
|
|
|
(string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "python")))
|
|
|
|
|
(indented_string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "python")))
|
2022-11-23 12:32:02 -05:00
|
|
|
])
|
2023-05-03 19:07:59 +09:00
|
|
|
(#match? @_func "(^|\\.)write(PyPy|Python)[23](Bin)?$")
|
|
|
|
|
(#set! injection.combined))
|
2022-11-23 12:32:02 -05:00
|
|
|
|
|
|
|
|
((apply_expression
|
|
|
|
|
function: (apply_expression
|
|
|
|
|
function: (apply_expression function: (_) @_func))
|
|
|
|
|
argument: [
|
2023-05-03 19:07:59 +09:00
|
|
|
(string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "rust")))
|
|
|
|
|
(indented_string_expression
|
|
|
|
|
((string_fragment) @injection.content (#set! injection.language "rust")))
|
2022-11-23 12:32:02 -05:00
|
|
|
])
|
2023-05-03 19:07:59 +09:00
|
|
|
(#match? @_func "(^|\\.)writeRust(Bin)?$")
|
|
|
|
|
(#set! injection.combined))
|