queries: bash, devicetree, yaml

This commit is contained in:
Blaž Hrastnik 2024-05-21 03:43:57 +09:00
parent 1231429028
commit b7656e0079
3 changed files with 17 additions and 14 deletions

View File

@ -7,7 +7,10 @@
(command_name) @function
(variable_name) @variable.other.member
(variable_name) @variable
((variable_name) @constant
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
[
"if"
@ -51,7 +54,7 @@
(command_substitution)
(process_substitution)
(expansion)
]@embedded
] @embedded
[
"$"

View File

@ -51,14 +51,14 @@
(integer_literal) @constant.numeric.integer
(identifier) @variable
(call_expression
function: (identifier) @function)
(labeled_item
label: (identifier) @label)
(identifier) @variable
(unit_address) @tag
(reference) @constant

View File

@ -1,13 +1,3 @@
(block_mapping_pair
key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member))
(block_mapping_pair
key: (flow_node (plain_scalar (string_scalar) @variable.other.member)))
(flow_mapping
(_ key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member)))
(flow_mapping
(_ key: (flow_node (plain_scalar (string_scalar) @variable.other.member))))
(boolean_scalar) @constant.builtin.boolean
(null_scalar) @constant.builtin
(double_quote_scalar) @string
@ -24,6 +14,16 @@
(yaml_directive) @keyword
(ERROR) @error
(block_mapping_pair
key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member))
(block_mapping_pair
key: (flow_node (plain_scalar (string_scalar) @variable.other.member)))
(flow_mapping
(_ key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member)))
(flow_mapping
(_ key: (flow_node (plain_scalar (string_scalar) @variable.other.member))))
[
","
"-"