tree-sitter-tiger/queries/highlights.scm
Bruno BELANYI bd42c2c9c1 Move 'literals' high-lighting to end of file
Once again, seems like order matters, and I want to be able to write more specific queries.
2022-06-03 20:30:45 +02:00

84 lines
977 B
Scheme

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