pull/13597/merge
zyrafal 2025-07-24 21:13:19 -04:00 committed by GitHub
commit d062f2200e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 14 deletions

View File

@ -23,7 +23,8 @@
; Modules
;--------
[(module_name) (module_type_name)] @namespace
[(module_name)] @type.structure
[(module_type_name)] @type.interface
; Types
;------
@ -33,7 +34,7 @@
(#match? @type.builtin "^(int|char|bytes|string|float|bool|unit|exn|array|list|option|int32|int64|nativeint|format6|lazy_t)$")
)
[(class_name) (class_type_name) (type_constructor)] @type
[(class_name) (class_type_name) (type_constructor)] @type.structure
[(constructor_name) (tag)] @constructor
@ -44,43 +45,44 @@
(value_pattern) @variable.parameter
(type_variable) @type.parameter
; Functions
;----------
(let_binding
pattern: (value_name) @function
pattern: (value_name) @variable
(parameter))
(let_binding
pattern: (value_name) @function
pattern: (value_name) @variable
body: [(fun_expression) (function_expression)])
(value_specification (value_name) @function)
(value_specification (value_name) @variable)
(external (value_name) @function)
(external (value_name) @variable)
(method_name) @function.method
; Application
;------------
(
(value_name) @function.builtin
(#match? @function.builtin "^(raise(_notrace)?|failwith|invalid_arg)$")
)
(infix_expression
left: (value_path (value_name) @function)
left: (value_path (value_name) @variable)
operator: (concat_operator) @operator
(#eq? @operator "@@"))
(infix_expression
operator: (rel_operator) @operator
right: (value_path (value_name) @function)
right: (value_path (value_name) @variable)
(#eq? @operator "|>"))
(application_expression
function: (value_path (value_name) @function))
function: (value_path (value_name) @variable))
((value_name) @function.builtin
(#match? @function.builtin "^(raise(_notrace)?|failwith|invalid_arg)$")
)
; Properties
;-----------