github-linguist 4.8.11 → 4.8.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,254 +1,249 @@
1
1
  {
2
- "name": "GDScript (Godot Engine)",
3
- "file_extensions": [
2
+ "fileTypes": [
4
3
  "gd"
5
4
  ],
6
- "scope": "source.gdscript",
7
- "contexts": {
8
- "main": [
9
- {
10
- "match": "(#).*$\\n?",
11
- "scope": "comment.line.number-sign.gdscript",
12
- "captures": {
13
- "1": "punctuation.definition.comment.number-sign.gdscript"
5
+ "name": "GDScript (Godot Engine)",
6
+ "patterns": [
7
+ {
8
+ "captures": {
9
+ "1": {
10
+ "name": "punctuation.definition.comment.number-sign.gdscript"
14
11
  }
15
12
  },
16
- {
17
- "match": "^(\"\"\")",
18
- "captures": {
19
- "1": "punctuation.definition.comment.triple-quote.gdscript"
20
- },
21
- "push": [
22
- {
23
- "meta_scope": "comment.block.triple-quote"
24
- },
25
- {
26
- "match": "(\"\"\")",
27
- "captures": {
28
- "1": "punctuation.definition.comment.triple-quote.gdscript"
29
- },
30
- "pop": true
31
- }
32
- ]
33
- },
34
- {
35
- "match": "\"",
36
- "push": [
37
- {
38
- "meta_scope": "string.quoted.double.gdscript"
39
- },
40
- {
41
- "match": "(?<!\\\\)\"",
42
- "pop": true
43
- }
44
- ]
45
- },
46
- {
47
- "match": "'",
48
- "push": [
49
- {
50
- "meta_scope": "string.quoted.single.gdscript"
51
- },
52
- {
53
- "match": "(?<!\\\\)'",
54
- "pop": true
55
- }
56
- ]
57
- },
58
- {
59
- "match": "\"\"\"",
60
- "push": [
61
- {
62
- "meta_scope": "string.quoted.triple.gdscript"
63
- },
64
- {
65
- "match": "(?<!\\\\)\"\"\"",
66
- "pop": true
67
- }
68
- ]
69
- },
70
- {
71
- "match": "@\"",
72
- "push": [
73
- {
74
- "meta_scope": "string.quoted.double.node-path.gdscript"
75
- },
76
- {
77
- "match": "(?<!\\\\)\"",
78
- "pop": true
79
- }
80
- ]
81
- },
82
- {
83
- "match": "\\b(?i:0x\\h*)\\b",
84
- "scope": "constant.numeric.integer.hexadecimal.gdscript"
85
- },
86
- {
87
- "match": "\\b(?i:(\\d+\\.\\d*(e[\\-\\+]?\\d+)?))\\b",
88
- "scope": "constant.numeric.float.gdscript"
89
- },
90
- {
91
- "match": "\\b(?i:(\\.\\d+(e[\\-\\+]?\\d+)?))\\b",
92
- "scope": "constant.numeric.float.gdscript"
93
- },
94
- {
95
- "match": "\\b(?i:(\\d+e[\\-\\+]?\\d+))\\b",
96
- "scope": "constant.numeric.float.gdscript"
97
- },
98
- {
99
- "match": "\\b\\d+\\b",
100
- "scope": "constant.numeric.integer.gdscript"
101
- },
102
- {
103
- "match": "\\b(?i:elif|else|for|if|while|break|continue|pass|return)\\b",
104
- "scope": "keyword.control.flow.gdscript"
105
- },
106
- {
107
- "match": "\\b(?i:&&|and|in|is|!|not|\\|\\||or)\\b",
108
- "scope": "keyword.operator.logical.gdscript"
109
- },
110
- {
111
- "match": "<=|>=|==|<|>|!=",
112
- "scope": "keyword.operator.comparison.gdscript"
113
- },
114
- {
115
- "match": "\\+=|-=|\\*=|/=|%=|&=|\\|=|\\*|/|%|\\+|-|<<|>>|&|\\||\\^|~",
116
- "scope": "keyword.operator.arithmetic.gdscript"
117
- },
118
- {
119
- "match": "=",
120
- "scope": "keyword.operator.assignment.gdscript"
121
- },
122
- {
123
- "match": "\\b(bool|int|float|String|funcref)\\b",
124
- "scope": "support.type.basic.gdscript"
125
- },
126
- {
127
- "match": "\\b(Vector[23]|Rect2|Matrix32?|Plane|Quat|AABB|Transform)\\b",
128
- "scope": "support.type.vector.gdscript"
129
- },
130
- {
131
- "match": "\\b(Color|Image|NodePath|RID|Object|InputEvent)\\b",
132
- "scope": "support.type.engine.gdscript"
133
- },
134
- {
135
- "match": "\\b(Array|Dictionary|ByteArray|IntArray|FloatArray|StringArray|Vector[23]Array|ColorArray)\\b",
136
- "scope": "support.type.container.gdscript"
13
+ "match": "(#).*$\\n?",
14
+ "name": "comment.line.number-sign.gdscript"
15
+ },
16
+ {
17
+ "begin": "^(\"\"\")",
18
+ "beginCaptures": {
19
+ "1": {
20
+ "name": "punctuation.definition.comment.triple-quote.gdscript"
21
+ }
137
22
  },
138
- {
139
- "match": "^\\s*(?i:(class))\\s+([a-zA-Z_][a-zA-Z_0-9]*)\\s*:",
140
- "captures": {
141
- "1": "storage.type.class.gdscript",
142
- "2": "entity.name.type.class.gdscript"
23
+ "end": "(\"\"\")",
24
+ "endCaptures": {
25
+ "1": {
26
+ "name": "punctuation.definition.comment.triple-quote.gdscript"
143
27
  }
144
28
  },
145
- {
146
- "match": "^\\s*(?i:(?:(static)\\s+)?(func))\\s+([a-zA-Z_][a-zA-Z_0-9]*)\\s*\\(",
147
- "captures": {
148
- "1": "storage.modifier.static-function.gdscript",
149
- "2": "storage.type.function.gdscript",
150
- "3": "entity.name.function.gdscript"
29
+ "name": "comment.block.triple-quote"
30
+ },
31
+ {
32
+ "begin": "\"",
33
+ "end": "(?<!\\\\)\"",
34
+ "name": "string.quoted.double.gdscript"
35
+ },
36
+ {
37
+ "begin": "'",
38
+ "end": "(?<!\\\\)'",
39
+ "name": "string.quoted.single.gdscript"
40
+ },
41
+ {
42
+ "begin": "\"\"\"",
43
+ "end": "(?<!\\\\)\"\"\"",
44
+ "name": "string.quoted.triple.gdscript"
45
+ },
46
+ {
47
+ "begin": "@\"",
48
+ "end": "(?<!\\\\)\"",
49
+ "name": "string.quoted.double.node-path.gdscript"
50
+ },
51
+ {
52
+ "match": "\\b(?i:0x\\h*)\\b",
53
+ "name": "constant.numeric.integer.hexadecimal.gdscript"
54
+ },
55
+ {
56
+ "match": "\\b(?i:(\\d+\\.\\d*(e[\\-\\+]?\\d+)?))\\b",
57
+ "name": "constant.numeric.float.gdscript"
58
+ },
59
+ {
60
+ "match": "\\b(?i:(\\.\\d+(e[\\-\\+]?\\d+)?))\\b",
61
+ "name": "constant.numeric.float.gdscript"
62
+ },
63
+ {
64
+ "match": "\\b(?i:(\\d+e[\\-\\+]?\\d+))\\b",
65
+ "name": "constant.numeric.float.gdscript"
66
+ },
67
+ {
68
+ "match": "\\b\\d+\\b",
69
+ "name": "constant.numeric.integer.gdscript"
70
+ },
71
+ {
72
+ "match": "\\b(?i:elif|else|for|if|while|break|continue|pass|return)\\b",
73
+ "name": "keyword.control.flow.gdscript"
74
+ },
75
+ {
76
+ "match": "\\b(?i:&&|and|in|is|!|not|\\|\\||or)\\b",
77
+ "name": "keyword.operator.logical.gdscript"
78
+ },
79
+ {
80
+ "match": "<=|>=|==|<|>|!=",
81
+ "name": "keyword.operator.comparison.gdscript"
82
+ },
83
+ {
84
+ "match": "\\+=|-=|\\*=|/=|%=|&=|\\|=|\\*|/|%|\\+|-|<<|>>|&|\\||\\^|~",
85
+ "name": "keyword.operator.arithmetic.gdscript"
86
+ },
87
+ {
88
+ "match": "=",
89
+ "name": "keyword.operator.assignment.gdscript"
90
+ },
91
+ {
92
+ "match": "\\b(bool|int|float|String|funcref)\\b",
93
+ "name": "support.type.basic.gdscript"
94
+ },
95
+ {
96
+ "match": "\\b(Vector[23]|Rect2|Matrix32?|Plane|Quat|AABB|Transform)\\b",
97
+ "name": "support.type.vector.gdscript"
98
+ },
99
+ {
100
+ "match": "\\b(Color|Image|NodePath|RID|Object|InputEvent)\\b",
101
+ "name": "support.type.engine.gdscript"
102
+ },
103
+ {
104
+ "match": "\\b(Array|Dictionary|ByteArray|IntArray|FloatArray|StringArray|Vector[23]Array|ColorArray)\\b",
105
+ "name": "support.type.container.gdscript"
106
+ },
107
+ {
108
+ "captures": {
109
+ "1": {
110
+ "name": "storage.type.class.gdscript"
151
111
  },
152
- "push": [
153
- {
154
- "match": "\\)\\s*:",
155
- "pop": true
156
- },
157
- {
158
- "match": "[a-zA-Z_][a-zA-Z_0-9]*",
159
- "scope": "variable.parameter.gdscript"
160
- }
161
- ]
112
+ "2": {
113
+ "name": "entity.name.type.class.gdscript"
114
+ }
162
115
  },
163
- {
164
- "match": "^\\s*(?i:(signal))\\s+([a-zA-Z_][a-zA-Z_0-9]*)\\s*\\(",
165
- "captures": {
166
- "1": "storage.type.signal.gdscript",
167
- "2": "entity.name.function.siglan.gdscript"
116
+ "match": "^\\s*(?i:(class))\\s+([a-zA-Z_][a-zA-Z_0-9]*)\\s*:"
117
+ },
118
+ {
119
+ "begin": "^\\s*(?i:(?:(static)\\s+)?(func))\\s+([a-zA-Z_][a-zA-Z_0-9]*)\\s*\\(",
120
+ "beginCaptures": {
121
+ "1": {
122
+ "name": "storage.modifier.static-function.gdscript"
168
123
  },
169
- "push": [
170
- {
171
- "match": "\\)\\s*:",
172
- "pop": true
173
- },
174
- {
175
- "match": "[a-zA-Z_][a-zA-Z_0-9]*",
176
- "scope": "variable.parameter.gdscript"
177
- }
178
- ]
179
- },
180
- {
181
- "match": "(?i:\\b(?:(onready)\\s+)?(var))\\s+([a-zA-Z_][a-zA-Z_0-9]*)",
182
- "captures": {
183
- "1": "keyword.other.onready.gdscript",
184
- "2": "storage.type.var.gdscript",
185
- "3": "variable.other.gdscript"
124
+ "2": {
125
+ "name": "storage.type.function.gdscript"
126
+ },
127
+ "3": {
128
+ "name": "entity.name.function.gdscript"
186
129
  }
187
130
  },
188
- {
189
- "match": "\\b(?i:(const))\\s+([a-zA-Z_][a-zA-Z_0-9]*)",
190
- "captures": {
191
- "1": "storage.type.const.gdscript",
192
- "2": "variable.other.gdscript"
131
+ "end": "\\)\\s*:",
132
+ "patterns": [
133
+ {
134
+ "match": "[a-zA-Z_][a-zA-Z_0-9]*",
135
+ "name": "variable.parameter.gdscript"
193
136
  }
194
- },
195
- {
196
- "match": "\\b(?i:extends|assert|breakpoint)\\b",
197
- "scope": "keyword.other.gdscript"
198
- },
199
- {
200
- "match": "(?<=extends)\\s+[a-zA-Z_][a-zA-Z_0-9]*(\\.([a-zA-Z_][a-zA-Z_0-9]*))?",
201
- "scope": "entity.other.inherited-class.gdscript"
202
- },
203
- {
204
- "match": "\\b(?i:true|false|null)\\b",
205
- "scope": "constant.language.gdscript"
206
- },
207
- {
208
- "match": "\\b(?i:export|tool)\\b",
209
- "scope": "storage.modifier.static.gdscript"
210
- },
211
- {
212
- "match": "\\b((?i:setget))\\b\\s+(?:,?([a-zA-Z_][a-zA-Z_0-9]*)|([a-zA-Z_][a-zA-Z_0-9]*)\\s*,\\s*([a-zA-Z_][a-zA-Z_0-9]*))",
213
- "captures": {
214
- "1": "keyword.operator.setget.gdscript",
215
- "2": "entity.name.function.gdscript",
216
- "3": "entity.name.function.gdscript",
217
- "4": "entity.name.function.gdscript"
137
+ ]
138
+ },
139
+ {
140
+ "begin": "^\\s*(?i:(signal))\\s+([a-zA-Z_][a-zA-Z_0-9]*)\\s*\\(",
141
+ "beginCaptures": {
142
+ "1": {
143
+ "name": "storage.type.signal.gdscript"
144
+ },
145
+ "2": {
146
+ "name": "entity.name.function.siglan.gdscript"
218
147
  }
219
148
  },
220
- {
221
- "match": "\\b(?i:yield)\\b",
222
- "scope": "keyword.control.flow.yield.gdscript"
149
+ "end": "\\)\\s*:",
150
+ "patterns": [
151
+ {
152
+ "match": "[a-zA-Z_][a-zA-Z_0-9]*",
153
+ "name": "variable.parameter.gdscript"
154
+ }
155
+ ]
156
+ },
157
+ {
158
+ "captures": {
159
+ "1": {
160
+ "name": "keyword.other.onready.gdscript"
161
+ },
162
+ "2": {
163
+ "name": "storage.type.var.gdscript"
164
+ },
165
+ "3": {
166
+ "name": "variable.other.gdscript"
167
+ }
223
168
  },
224
- {
225
- "match": "\\b(?i:var|const|onready|class|func|signal)\\b",
226
- "scope": "invalid.illegal"
169
+ "match": "(?i:\\b(?:(onready)\\s+)?(var))\\s+([a-zA-Z_][a-zA-Z_0-9]*)"
170
+ },
171
+ {
172
+ "captures": {
173
+ "1": {
174
+ "name": "storage.type.const.gdscript"
175
+ },
176
+ "2": {
177
+ "name": "variable.other.gdscript"
178
+ }
227
179
  },
228
- {
229
- "match": "([A-Z][a-zA-Z_0-9]*)",
230
- "scope": "entity.name.type.class-type.gdscript"
180
+ "match": "\\b(?i:(const))\\s+([a-zA-Z_][a-zA-Z_0-9]*)"
181
+ },
182
+ {
183
+ "match": "\\b(?i:extends|assert|breakpoint)\\b",
184
+ "name": "keyword.other.gdscript"
185
+ },
186
+ {
187
+ "match": "(?<=extends)\\s+[a-zA-Z_][a-zA-Z_0-9]*(\\.([a-zA-Z_][a-zA-Z_0-9]*))?",
188
+ "name": "entity.other.inherited-class.gdscript"
189
+ },
190
+ {
191
+ "match": "\\b(?i:true|false|null)\\b",
192
+ "name": "constant.language.gdscript"
193
+ },
194
+ {
195
+ "match": "\\b(?i:export|tool)\\b",
196
+ "name": "storage.modifier.static.gdscript"
197
+ },
198
+ {
199
+ "captures": {
200
+ "1": {
201
+ "name": "keyword.operator.setget.gdscript"
202
+ },
203
+ "2": {
204
+ "name": "entity.name.function.gdscript"
205
+ },
206
+ "3": {
207
+ "name": "entity.name.function.gdscript"
208
+ },
209
+ "4": {
210
+ "name": "entity.name.function.gdscript"
211
+ }
231
212
  },
232
- {
233
- "match": "([a-z_][a-zA-Z_0-9]*)",
234
- "scope": "entity.name.type.variant.gdscript"
213
+ "match": "\\b((?i:setget))\\b\\s+(?:,?([a-zA-Z_][a-zA-Z_0-9]*)|([a-zA-Z_][a-zA-Z_0-9]*)\\s*,\\s*([a-zA-Z_][a-zA-Z_0-9]*))"
214
+ },
215
+ {
216
+ "match": "\\b(?i:yield)\\b",
217
+ "name": "keyword.control.flow.yield.gdscript"
218
+ },
219
+ {
220
+ "match": "\\b(?i:var|const|onready|class|func|signal)\\b",
221
+ "name": "invalid.illegal"
222
+ },
223
+ {
224
+ "match": "([A-Z][a-zA-Z_0-9]*)",
225
+ "name": "entity.name.type.class-type.gdscript"
226
+ },
227
+ {
228
+ "match": "([a-z_][a-zA-Z_0-9]*)",
229
+ "name": "entity.name.type.variant.gdscript"
230
+ },
231
+ {
232
+ "begin": "([a-z][a-zA-Z_0-9]*)\\s*\\(",
233
+ "beginCaptures": {
234
+ "1": {
235
+ "name": "entity.name.function.reference.gdscript"
236
+ }
235
237
  },
236
- {
237
- "match": "([a-z][a-zA-Z_0-9]*)\\s*\\(",
238
- "captures": {
239
- "1": "entity.name.function.reference.gdscript"
240
- },
241
- "push": [
242
- {
243
- "match": "\\)",
244
- "pop": true
245
- },
246
- {
247
- "match": "([a-zA-Z_][a-zA-Z_0-9]*)",
248
- "scope": "variable.parameter.gdscript"
249
- }
250
- ]
251
- }
252
- ]
253
- }
238
+ "end": "\\)",
239
+ "patterns": [
240
+ {
241
+ "match": "([a-zA-Z_][a-zA-Z_0-9]*)",
242
+ "name": "variable.parameter.gdscript"
243
+ }
244
+ ]
245
+ }
246
+ ],
247
+ "scopeName": "source.gdscript",
248
+ "uuid": "e08b7d98-5d50-4aa9-8935-7c759a4a8fdd"
254
249
  }