Files
tree-sitter-lscript/queries/highlights.scm
T

63 lines
1.7 KiB
Scheme

[
"and"
"as"
"bits"
"break"
"continue"
"distinct"
"else"
"for"
"if"
"in"
"loop"
"match"
"not"
"or"
"pub"
"return"
"use"
] @keyword
(comment) @comment
(string_literal) @string
(character_literal) @character
(integer_literal) @number
(float_literal) @number.float
(boolean_literal) @constant.builtin
(default_expression) @keyword
(primitive_type) @type.builtin
(type_name) @type
(binder_entry type: (identifier) @type)
(module_path) @module
(declaration name: (identifier) @function value: (function_literal))
(declaration name: (identifier) @function type: (function_type))
(declaration name: (identifier) @type.definition value: (type_definition))
(pipeline_callable (identifier) @function.call .)
(aggregate_pipeline_callable (identifier) @function.call .)
(constraint_entry name: (identifier) @function)
(output_type function: (identifier) @function)
(output_type function: (qualified_name (identifier) @function .))
(postfix_expression member: (identifier) @variable.member)
(product_constructor (type_name) @type)
(sum_constructor variant: (identifier) @constructor)
(sum_pattern variant: (identifier) @constructor)
(label (identifier) @label)
(typed_parameter pattern: (identifier) @variable.parameter)
(typed_tuple_component pattern: (identifier) @variable.parameter)
(product_field name: (identifier) @variable.member)
(product_entry (identifier) @property)
(sum_variant name: (identifier) @constructor)
(bits_member (identifier) @constant)
[
"=" "+=" "-=" "*=" "/=" "%=" "&=" "^=" "|=" "::" ":="
"==" "<" "<=" ">" ">="
"+" "-" "*" "/" "%" "&" "|" "^" "~"
"->" "=>" "|>" "..<" "..=" "@" "?" "..."
] @operator
["(" ")" "[" "]" "{" "}" ":" ";" "," "."] @punctuation