File tree 2 files changed +18
-18
lines changed 2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 1
1
; CREDITS @stumash ([email protected] )
2
2
3
+ (field_expression field: (identifier) @property)
4
+ (field_expression value: (identifier) @type
5
+ (#match? @type " ^[A-Z]" ))
6
+
7
+ (type_identifier) @type
8
+
3
9
(class_definition
4
10
name: (identifier) @type)
5
11
20
26
21
27
; ; variables
22
28
23
- (class_parameter
29
+ (class_parameter
24
30
name: (identifier) @parameter)
25
31
26
32
(self_type (identifier) @parameter)
33
39
(type_definition
34
40
name: (type_identifier) @type.definition)
35
41
36
- (type_identifier) @type
37
-
38
42
; ; val/var definitions/declarations
39
43
40
44
(val_definition
49
53
(var_declaration
50
54
name: (identifier) @variable)
51
55
52
- ; method definition
53
-
54
- (function_declaration
55
- name: (identifier) @method)
56
-
57
- (function_definition
58
- name: (identifier) @method)
59
-
60
56
; imports/exports
61
57
62
58
(import_declaration
110
106
(binding
111
107
name: (identifier) @parameter)
112
108
113
- ; expressions
109
+ ; method definition
114
110
115
- (field_expression field: (identifier) @property)
116
- (field_expression value: (identifier) @type
117
- (#match? @type " ^[A-Z]" ))
111
+ (function_declaration
112
+ name: (identifier) @method)
113
+
114
+ (function_definition
115
+ name: (identifier) @method)
116
+
117
+ ; expressions
118
118
119
119
(infix_expression operator: (identifier) @operator)
120
120
(infix_expression operator: (operator_identifier) @operator)
235
235
236
236
" return" @keyword.return
237
237
238
- (comment) @comment @spell
239
- (block_comment) @comment @spell
238
+ (comment) @spell @comment
239
+ (block_comment) @spell @comment
240
240
241
241
; ; `case` is a conditional keyword in case_block
242
242
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ object A:
117
117
// ^type
118
118
119
119
:: (123 )
120
- // ^function.call
120
+ // ^operator
121
121
// ^number
122
122
123
123
object bla :
You can’t perform that action at this time.
0 commit comments