1
0
This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
tree-sitter-minizinc/queries/highlights.scm

115 lines
1.1 KiB
Scheme

; Function calls
(call name: (identifier) @function)
; Function definitions
(function_item name: (identifier) @function)
(predicate name: (identifier) @function)
; Types
(primitive_type) @type.builtin
[
"array"
"of"
"par"
"set"
"var"
] @type.builtin
; Identifiers
(identifier) @variable
; Keywords
[
"annotation"
"constraint"
"else"
"elseif"
"endif"
"function"
"if"
"in"
"include"
"let"
"maximize"
"minimize"
"output"
"predicate"
"satisfy"
"solve"
"test"
"then"
"where"
] @keyword
; Operators
[
"<->"
"->"
"<-"
"\/"
"xor"
"/\"
"="
"=="
"!="
"<"
"<="
">"
">="
"in"
"subset"
"superset"
"union"
"diff"
"symdiff"
"intersect"
".."
"+"
"-"
"++"
"*"
"/"
"div"
"mod"
"^"
"::"
] @operator
; Punctuation
[
","
":"
";"
"|"
] @punctuation.delimiter
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
; Literals
[
(integer_literal)
(float_literal)
] @number
[
(string_literal)
(string_interpolation)
] @string
(escape_sequence) @escape
[
(absent)
(boolean_literal)
] @constant.builtin
; Comments
[
(block_comment)
(line_comment)
] @comment