tree-sitter-tiger/queries/highlights.scm
Bruno BELANYI 67b555c381 Move 'misc' high-lighting to end of file
Turns out that order *matters* for queries.

Tree-sitter will stop at the first match it seems. So I want the
hyper-general 'identifier' matching right at the end to avoid overriding
more specific rules.
2022-06-03 19:58:19 +02:00

60 lines
638 B
Scheme

; Keywords {{{
[
"array"
(break_expression)
"do"
"else"
"end"
"for"
"function"
"if"
"import"
"in"
"let"
"of"
"primitive"
"then"
"to"
"type"
"var"
"while"
] @keyword
; }}}
; Literals {{{
(nil_literal) @constant.builtin
(integer_literal) @number
(string_literal) @string
(escape_sequence) @string.escape
; }}}
; Operators {{{
(operator) @operator
[
","
";"
":"
"."
] @punctuation.delimiter
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
; }}}
; Misc {{{
(comment) @comment
(type_identifier) @type
(field_identifier) @property
(identifier) @variable
; }}}
; vim: sw=2 foldmethod=marker