|
|
@ -9,32 +9,25 @@
|
|
|
|
;; Keywords
|
|
|
|
;; Keywords
|
|
|
|
[
|
|
|
|
[
|
|
|
|
(kw_forall)
|
|
|
|
(kw_forall)
|
|
|
|
(type_kw)
|
|
|
|
|
|
|
|
(kw_equals)
|
|
|
|
(kw_equals)
|
|
|
|
(do)
|
|
|
|
(do)
|
|
|
|
|
|
|
|
(kw_let)
|
|
|
|
(ability)
|
|
|
|
(ability)
|
|
|
|
(where)
|
|
|
|
(where)
|
|
|
|
] @keyword
|
|
|
|
] @keyword
|
|
|
|
|
|
|
|
|
|
|
|
(kw_let) @keyword.function
|
|
|
|
(kw_let) @keyword.function
|
|
|
|
(type_kw) @keyword.storage.type
|
|
|
|
(type_kw) @keyword.storage.modifier
|
|
|
|
(unique) @keyword.storage.modifier
|
|
|
|
|
|
|
|
(structural) @keyword.storage.modifier
|
|
|
|
(structural) @keyword.storage.modifier
|
|
|
|
("use") @keyword.control.import
|
|
|
|
("use") @keyword.control.import
|
|
|
|
|
|
|
|
(unique) @keyword.storage.modifier
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
(type_constructor)
|
|
|
|
|
|
|
|
] @constructor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
[
|
|
|
|
(operator)
|
|
|
|
(operator)
|
|
|
|
(pipe)
|
|
|
|
(pipe)
|
|
|
|
(arrow_symbol)
|
|
|
|
(arrow_symbol)
|
|
|
|
(">")
|
|
|
|
|
|
|
|
(or)
|
|
|
|
(or)
|
|
|
|
(and)
|
|
|
|
(and)
|
|
|
|
(bang)
|
|
|
|
|
|
|
|
] @operator
|
|
|
|
] @operator
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
[
|
|
|
@ -48,24 +41,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
(blank_pattern) @variable.builtin
|
|
|
|
(blank_pattern) @variable.builtin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(pattern) @variable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(use_clause) @keyword.import
|
|
|
|
|
|
|
|
|
|
|
|
;; Types
|
|
|
|
;; Types
|
|
|
|
(record_field name: (wordy_id) @variable.other.member type: (_) @type)
|
|
|
|
(record_field
|
|
|
|
(type_constructor (type_name (wordy_id) @constructor))
|
|
|
|
(field_name) @variable.other.member
|
|
|
|
(ability_declaration type_name: (wordy_id) @type type_arg: (wordy_id) @variable.parameter)
|
|
|
|
type: (regular_identifier) @type)
|
|
|
|
(effect (wordy_id) @special) ;; NOTE: an effect is just like a type, but in signature we special case it
|
|
|
|
|
|
|
|
|
|
|
|
(type_name) @type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(type_declaration
|
|
|
|
|
|
|
|
(regular_identifier) @type.enum.variant)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(ability_name
|
|
|
|
|
|
|
|
(path)? @namespace
|
|
|
|
|
|
|
|
(regular_identifier) @type)
|
|
|
|
|
|
|
|
|
|
|
|
;; Namespaces
|
|
|
|
(ability_declaration
|
|
|
|
(path) @namespace
|
|
|
|
(ability_name) @type
|
|
|
|
(namespace) @namespace
|
|
|
|
(type_argument) @variable.parameter)
|
|
|
|
|
|
|
|
|
|
|
|
;; Terms
|
|
|
|
(type_constructor) @constructor
|
|
|
|
(type_signature term_name: (path)? @variable term_name: (wordy_id) @variable)
|
|
|
|
|
|
|
|
(type_signature (wordy_id) @type)
|
|
|
|
|
|
|
|
(type_signature (term_type(delayed(wordy_id))) @type)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(term_definition param: (wordy_id) @variable.parameter)
|
|
|
|
(constructor
|
|
|
|
|
|
|
|
(constructor_name) @constructor)
|
|
|
|
|
|
|
|
|
|
|
|
(function_application function_name: (path)? function_name: (wordy_id) @function)
|
|
|
|
(constructor
|
|
|
|
|
|
|
|
type: (regular_identifier) @type)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(effect
|
|
|
|
|
|
|
|
(regular_identifier) @special) ; NOTE: an effect is a special type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Namespaces
|
|
|
|
|
|
|
|
(path) @module
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(namespace) @module
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Terms
|
|
|
|
|
|
|
|
(type_signature
|
|
|
|
|
|
|
|
term_name: (path) @module
|
|
|
|
|
|
|
|
term_name: (regular_identifier) @variable)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(type_signature
|
|
|
|
|
|
|
|
term_name: (regular_identifier) @variable)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(term_type) @type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(term_definition
|
|
|
|
|
|
|
|
name: (path) @namespace)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(term_definition
|
|
|
|
|
|
|
|
name: (regular_identifier) @variable)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(term_definition
|
|
|
|
|
|
|
|
param: (regular_identifier) @variable.parameter)
|
|
|
|
|
|
|
|
|
|
|
|
;; Punctuation
|
|
|
|
;; Punctuation
|
|
|
|
[
|
|
|
|
[
|
|
|
@ -82,4 +113,6 @@
|
|
|
|
"]"
|
|
|
|
"]"
|
|
|
|
] @punctuation.bracket
|
|
|
|
] @punctuation.bracket
|
|
|
|
|
|
|
|
|
|
|
|
(test_watch_expression (wordy_id) @keyword.directive)
|
|
|
|
(watch_expression) @keyword.directive
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(test_watch_expression) @keyword.directive
|
|
|
|