|
|
@ -21,6 +21,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
; Functions
|
|
|
|
; Functions
|
|
|
|
(unqualified_import (identifier) @function)
|
|
|
|
(unqualified_import (identifier) @function)
|
|
|
|
|
|
|
|
(unqualified_import "type" (type_identifier) @type)
|
|
|
|
|
|
|
|
(unqualified_import (type_identifier) @constructor)
|
|
|
|
(function
|
|
|
|
(function
|
|
|
|
name: (identifier) @function)
|
|
|
|
name: (identifier) @function)
|
|
|
|
(external_function
|
|
|
|
(external_function
|
|
|
@ -43,6 +45,13 @@
|
|
|
|
(tuple_access
|
|
|
|
(tuple_access
|
|
|
|
index: (integer) @variable.other.member)
|
|
|
|
index: (integer) @variable.other.member)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Attributes
|
|
|
|
|
|
|
|
(attribute
|
|
|
|
|
|
|
|
"@" @attribute
|
|
|
|
|
|
|
|
name: (identifier) @attribute)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(attribute_value (identifier) @constant)
|
|
|
|
|
|
|
|
|
|
|
|
; Type names
|
|
|
|
; Type names
|
|
|
|
(remote_type_identifier) @type
|
|
|
|
(remote_type_identifier) @type
|
|
|
|
(type_identifier) @type
|
|
|
|
(type_identifier) @type
|
|
|
@ -60,10 +69,6 @@
|
|
|
|
(identifier) @variable
|
|
|
|
(identifier) @variable
|
|
|
|
(discard) @comment.unused
|
|
|
|
(discard) @comment.unused
|
|
|
|
|
|
|
|
|
|
|
|
; Operators
|
|
|
|
|
|
|
|
(binary_expression
|
|
|
|
|
|
|
|
operator: _ @operator)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Keywords
|
|
|
|
; Keywords
|
|
|
|
[
|
|
|
|
[
|
|
|
|
(visibility_modifier) ; "pub"
|
|
|
|
(visibility_modifier) ; "pub"
|
|
|
@ -72,6 +77,7 @@
|
|
|
|
"assert"
|
|
|
|
"assert"
|
|
|
|
"case"
|
|
|
|
"case"
|
|
|
|
"const"
|
|
|
|
"const"
|
|
|
|
|
|
|
|
; DEPRECATED: 'external' was removed in v0.30.
|
|
|
|
"external"
|
|
|
|
"external"
|
|
|
|
"fn"
|
|
|
|
"fn"
|
|
|
|
"if"
|
|
|
|
"if"
|
|
|
@ -79,11 +85,16 @@
|
|
|
|
"let"
|
|
|
|
"let"
|
|
|
|
"panic"
|
|
|
|
"panic"
|
|
|
|
"todo"
|
|
|
|
"todo"
|
|
|
|
"try"
|
|
|
|
|
|
|
|
"type"
|
|
|
|
"type"
|
|
|
|
"use"
|
|
|
|
"use"
|
|
|
|
] @keyword
|
|
|
|
] @keyword
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Operators
|
|
|
|
|
|
|
|
(binary_expression
|
|
|
|
|
|
|
|
operator: _ @operator)
|
|
|
|
|
|
|
|
(boolean_negation "!" @operator)
|
|
|
|
|
|
|
|
(integer_negation "-" @operator)
|
|
|
|
|
|
|
|
|
|
|
|
; Punctuation
|
|
|
|
; Punctuation
|
|
|
|
[
|
|
|
|
[
|
|
|
|
"("
|
|
|
|
"("
|
|
|
|