tree-sitter-rake 0.4.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,144 @@
1
+ ; Rake canonical syntax highlighting
2
+
3
+ (identifier) @variable
4
+
5
+ [
6
+ (line_comment)
7
+ (block_comment)
8
+ ] @comment
9
+
10
+ [
11
+ "stack"
12
+ "record"
13
+ "crunch"
14
+ "rake"
15
+ "run"
16
+ "slow"
17
+ "extern"
18
+ "state"
19
+ "embed"
20
+ "const"
21
+ "let"
22
+ "return"
23
+ "yield"
24
+ ] @keyword
25
+
26
+ [
27
+ "tine"
28
+ "when"
29
+ "through"
30
+ "else"
31
+ "into"
32
+ "sweep"
33
+ "for"
34
+ "in"
35
+ "using"
36
+ "up"
37
+ "to"
38
+ "from"
39
+ "by"
40
+ "if"
41
+ "then"
42
+ "while"
43
+ "repeat"
44
+ "unchecked"
45
+ "ptr"
46
+ "mut"
47
+ ] @keyword
48
+
49
+ (break_statement) @keyword
50
+ (continue_statement) @keyword
51
+
52
+ [
53
+ "pack"
54
+ "stack"
55
+ ] @keyword
56
+
57
+ (storage_type) @type.builtin
58
+ (rack_type) @type.builtin
59
+ (mask_type) @type.builtin
60
+ (type_identifier) @type
61
+ (record_definition name: (type_identifier) @type)
62
+ (record_expression record: (type_identifier) @type)
63
+
64
+ (stack_definition name: (type_identifier) @type)
65
+ (crunch_definition name: (identifier) @function)
66
+ (rake_definition name: (identifier) @function)
67
+ (run_definition name: (identifier) @function)
68
+ (slow_definition name: (identifier) @function)
69
+ (extern_definition name: (identifier) @function)
70
+ (conversion_expression kind: _ @function.builtin)
71
+ (call_expression function: (identifier) @function)
72
+ (call_expression function: "fma" @function.builtin)
73
+ (shuffle_expression "shuffle" @function)
74
+ (static_move_expression function: _ @function)
75
+
76
+ (field_group name: (identifier) @property)
77
+ (record_field_group name: (identifier) @property)
78
+ (field_initializer field: (identifier) @property)
79
+ (field_expression field: (identifier) @property)
80
+
81
+ (value_parameter name: (identifier) @variable.parameter)
82
+ (scalar_parameter name: (scalar_name) @variable.parameter)
83
+ (scalar_variable name: (scalar_name) @variable)
84
+ (uniform_binding name: (scalar_name) @variable)
85
+
86
+ (let_statement name: (identifier) @variable)
87
+ (fused_binding name: (identifier) @variable)
88
+ (mutable_binding name: (identifier) @variable)
89
+ (assignment_statement target: (primary_expression (identifier) @variable))
90
+ (through_statement name: (identifier) @variable)
91
+ (traversal_statement binding: (identifier) @variable)
92
+
93
+ ; Rake marks one idea with each symbol: a tine is a mask, angle brackets a
94
+ ; uniform, and the bars and arrows of a fused binding or sweep a data flow.
95
+ (tine "#" @tag (tine_name) @tag)
96
+ (scalar_parameter "<" @constant ">" @constant)
97
+ (scalar_expression "<" @constant ">" @constant) @constant
98
+
99
+ (fused_binding "|" @operator.flow "<|" @operator.flow)
100
+ (sweep_arm "|" @operator.flow "=>" @operator.flow)
101
+ (sweep_arm selector: "_" @constant.builtin)
102
+
103
+ [
104
+ "->"
105
+ ":="
106
+ "<-"
107
+ "="
108
+ "+"
109
+ "-"
110
+ "*"
111
+ "/"
112
+ "%"
113
+ "<"
114
+ "<="
115
+ ">"
116
+ ">="
117
+ "!="
118
+ "and"
119
+ "or"
120
+ "not"
121
+ ] @operator
122
+
123
+ (integer_literal) @number
124
+ (string_literal) @string
125
+ (float_literal) @number
126
+ (boolean_literal) @boolean
127
+ (lanes) @constant.builtin
128
+ (lane_index) @constant.builtin
129
+
130
+ [
131
+ "("
132
+ ")"
133
+ "{"
134
+ "}"
135
+ "["
136
+ "]"
137
+ ] @punctuation.bracket
138
+
139
+ [
140
+ ","
141
+ ";"
142
+ ":"
143
+ "."
144
+ ] @punctuation.delimiter