tree-sitter-tiger/queries/highlights.scm

77 lines
924 B
Scheme
Raw Normal View History

2022-06-02 22:27:42 +02:00
; Keywords {{{
[
"function"
"primitive"
] @keyword.function
2022-06-02 22:27:42 +02:00
[
"array"
(break_expression)
"do"
"else"
"end"
"for"
"function"
"if"
"import"
"in"
"let"
"of"
"primitive"
"then"
"to"
"type"
"var"
"while"
] @keyword
; }}}
2022-06-02 17:32:37 +02:00
; Literals {{{
(nil_literal) @constant.builtin
(integer_literal) @number
(string_literal) @string
2022-06-03 12:03:10 +02:00
(escape_sequence) @string.escape
2022-06-02 17:32:37 +02:00
; }}}
2022-06-03 10:08:58 +02:00
; Operators {{{
(operator) @operator
[
","
";"
2022-06-03 11:43:43 +02:00
":"
2022-06-03 10:08:58 +02:00
"."
] @punctuation.delimiter
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
; }}}
2022-06-03 19:59:56 +02:00
; Functions {{{
(function_call
function: (identifier) @function)
(function_declaration
name: (identifier) @function)
(primitive_declaration
name: (identifier) @function)
(parameters
name: (identifier) @variable.parameter)
; }}}
; Misc {{{
(comment) @comment
(type_identifier) @type
(field_identifier) @property
(identifier) @variable
; }}}
2022-06-02 17:25:31 +02:00
; vim: sw=2 foldmethod=marker