tree-sitter-bp/queries/highlights.scm
Bruno BELANYI b62fc19da9 Make comments a single node in the grammar
This looks to be a *strong* idiom in tree-sitter parsers.
2024-04-11 18:36:20 +01:00

67 lines
825 B
Scheme

(comment) @comment
; Operators {{{
(operator) @operator
(integer_literal ("-") @operator)
; }}}
; Punctuation {{{
[
","
":"
] @punctuation.delimiter
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
; }}}
; Literal {{{
(boolean_literal) @boolean
(integer_literal) @number
[
(raw_string_literal)
(interpreted_string_literal)
] @string
(escape_sequence) @string.escape
; }}}
; Declarations {{{
(identifier) @variable
(module
type: (identifier) @function.call)
(module
(property
field: (identifier) @variable.parameter))
; }}}
; Built-ins {{{
[
(unset)
"default"
] @variable.builtin
(selection_type) @function.builtin
; }}}
; Expressions {{{
(map_expression
(property
field: (identifier) @property))
(select_expression
"select" @keyword.conditional)
; }}}
; vim: sw=2 foldmethod=marker