github-linguist 5.1.0 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -308,7 +308,7 @@
308
308
  "name": "constant.numeric.real.opal"
309
309
  },
310
310
  {
311
- "match": "\\\"0x\\h+\\\"!",
311
+ "match": "\\\"0x[0-9A-Fa-f]+\\\"!",
312
312
  "name": "constant.numeric.hexadecimal.opal"
313
313
  },
314
314
  {
@@ -0,0 +1,290 @@
1
+ {
2
+ "name": "KiCad PCB (Board)",
3
+ "scopeName": "source.pcb.board",
4
+ "fileTypes": [
5
+ "brd"
6
+ ],
7
+ "firstLineMatch": "^\\s*PCBNEW-BOARD\\s+Version\\s",
8
+ "limitLineLength": false,
9
+ "patterns": [
10
+ {
11
+ "begin": "\\A(?=<\\?xml\\s+version=\"[\\d.]+\"\\s)",
12
+ "end": "(?=A)B",
13
+ "patterns": [
14
+ {
15
+ "include": "text.xml"
16
+ }
17
+ ],
18
+ "contentName": "source.eagle.pcb.board"
19
+ },
20
+ {
21
+ "include": "#main"
22
+ }
23
+ ],
24
+ "repository": {
25
+ "main": {
26
+ "patterns": [
27
+ {
28
+ "include": "#header"
29
+ },
30
+ {
31
+ "include": "#comment"
32
+ },
33
+ {
34
+ "include": "#sections"
35
+ }
36
+ ]
37
+ },
38
+ "header": {
39
+ "name": "meta.header.pcb.board",
40
+ "match": "^\\s*(PCBNEW-BOARD)\\s+(Version)\\s+([\\d.]+)\\s+(date)\\s+(\\S.*)\\s*$",
41
+ "captures": {
42
+ "1": {
43
+ "name": "storage.type.class.pcb.board"
44
+ },
45
+ "2": {
46
+ "name": "entity.name.var.pcb.board"
47
+ },
48
+ "3": {
49
+ "name": "constant.numeric.decimal.pcb.board"
50
+ },
51
+ "4": {
52
+ "name": "entity.name.var.pcb.board"
53
+ },
54
+ "5": {
55
+ "name": "constant.numeric.date.timestamp.pcb.board"
56
+ }
57
+ }
58
+ },
59
+ "comment": {
60
+ "name": "comment.line.number-sign.pcb.board",
61
+ "begin": "#",
62
+ "end": "$",
63
+ "beginCaptures": {
64
+ "0": {
65
+ "name": "punctuation.definition.comment.pcb.board"
66
+ }
67
+ }
68
+ },
69
+ "integer": {
70
+ "name": "constant.numeric.integer.decimal.pcb.board",
71
+ "match": "[-+]?\\d+(?=\\s|$)"
72
+ },
73
+ "sections": {
74
+ "patterns": [
75
+ {
76
+ "name": "meta.section.module.pcb.board",
77
+ "begin": "^\\s*((\\$)MODULE)\\s+(\\S+)",
78
+ "end": "^\\s*((\\$)EndMODULE)\\s+(\\3)(?=\\s|$)",
79
+ "beginCaptures": {
80
+ "1": {
81
+ "name": "keyword.control.section.module.pcb.board"
82
+ },
83
+ "2": {
84
+ "name": "punctuation.section.begin.pcb.board"
85
+ },
86
+ "3": {
87
+ "name": "entity.name.type.class.pcb.board"
88
+ }
89
+ },
90
+ "endCaptures": {
91
+ "1": {
92
+ "name": "keyword.control.section.module.pcb.board"
93
+ },
94
+ "2": {
95
+ "name": "punctuation.section.end.pcb.board"
96
+ },
97
+ "3": {
98
+ "name": "entity.name.type.class.pcb.board"
99
+ }
100
+ },
101
+ "patterns": [
102
+ {
103
+ "match": "^\\s*(\\Po\\s+.+\\s+)([~F][~P])\\s*$",
104
+ "captures": {
105
+ "1": {
106
+ "patterns": [
107
+ {
108
+ "include": "#fields"
109
+ }
110
+ ]
111
+ },
112
+ "2": {
113
+ "name": "keyword.operator.position-type.pcb.board"
114
+ }
115
+ }
116
+ },
117
+ {
118
+ "include": "#fields"
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ "name": "meta.section.polyscorners.pcb.board",
124
+ "begin": "^\\s*((\\$)POLYSCORNERS)\\s*$",
125
+ "end": "^\\s*((\\$)endPOLYSCORNERS)(?=\\s|$)",
126
+ "beginCaptures": {
127
+ "1": {
128
+ "name": "keyword.control.section.pcb.board"
129
+ },
130
+ "2": {
131
+ "name": "punctuation.section.begin.pcb.board"
132
+ }
133
+ },
134
+ "endCaptures": {
135
+ "1": {
136
+ "name": "keyword.control.section.pcb.board"
137
+ },
138
+ "2": {
139
+ "name": "punctuation.section.end.pcb.board"
140
+ }
141
+ },
142
+ "patterns": [
143
+ {
144
+ "include": "#integer"
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ "name": "meta.section.${3:/downcase}.pcb.board",
150
+ "begin": "^\\s*((\\$)([A-Z][A-Z0-9_]*+))(?=\\s|$)",
151
+ "end": "^\\s*((\\$)[Ee]nd\\3)(?=\\s|$)",
152
+ "beginCaptures": {
153
+ "1": {
154
+ "name": "keyword.control.section.pcb.board"
155
+ },
156
+ "2": {
157
+ "name": "punctuation.section.begin.pcb.board"
158
+ }
159
+ },
160
+ "endCaptures": {
161
+ "1": {
162
+ "name": "keyword.control.section.pcb.board"
163
+ },
164
+ "2": {
165
+ "name": "punctuation.section.end.pcb.board"
166
+ }
167
+ },
168
+ "patterns": [
169
+ {
170
+ "include": "#fields"
171
+ }
172
+ ]
173
+ },
174
+ {
175
+ "match": "^\\s*((\\$)EndBOARD)(?=\\s|$)",
176
+ "captures": {
177
+ "1": {
178
+ "name": "keyword.control.eof.pcb.board"
179
+ },
180
+ "2": {
181
+ "name": "punctuation.section.end.pcb.board"
182
+ }
183
+ }
184
+ }
185
+ ]
186
+ },
187
+ "fields": {
188
+ "patterns": [
189
+ {
190
+ "match": "^\\s*(PcbPlotParams)\\s+(.+)$",
191
+ "captures": {
192
+ "1": {
193
+ "name": "entity.name.var.pcb.board"
194
+ },
195
+ "2": {
196
+ "patterns": [
197
+ {
198
+ "include": "source.pcb.sexp"
199
+ }
200
+ ]
201
+ }
202
+ }
203
+ },
204
+ {
205
+ "match": "^\\s*(Layer)(\\[)([0-9]+)(\\])(?=\\s)",
206
+ "captures": {
207
+ "1": {
208
+ "name": "entity.name.var.pcb.board"
209
+ },
210
+ "2": {
211
+ "name": "punctuation.section.begin.brace.bracket.square.pcb.board"
212
+ },
213
+ "3": {
214
+ "name": "constant.numeric.integer.decimal.pcb.board"
215
+ },
216
+ "4": {
217
+ "name": "punctuation.section.end.brace.bracket.square.pcb.board"
218
+ }
219
+ }
220
+ },
221
+ {
222
+ "match": "^\\s*(Cd)\\s+(\\S.*)\\s*$",
223
+ "captures": {
224
+ "1": {
225
+ "name": "entity.name.var.pcb.board"
226
+ },
227
+ "2": {
228
+ "name": "string.unquoted.pcb.board"
229
+ }
230
+ }
231
+ },
232
+ {
233
+ "match": "^\\s*([^$\\s]\\S*)",
234
+ "captures": {
235
+ "1": {
236
+ "name": "entity.name.var.pcb.board"
237
+ }
238
+ }
239
+ },
240
+ {
241
+ "name": "string.quoted.double.pcb.board",
242
+ "match": "(\")((?:[^\"\\\\]|\\\\.)*)(\"|(?=$))",
243
+ "captures": {
244
+ "1": {
245
+ "name": "punctuation.definition.string.begin.pcb.board"
246
+ },
247
+ "2": {
248
+ "patterns": [
249
+ {
250
+ "match": "\\\\.",
251
+ "name": "constant.character.escape.pcb.board"
252
+ }
253
+ ]
254
+ },
255
+ "3": {
256
+ "name": "punctuation.definition.string.end.pcb.board"
257
+ }
258
+ }
259
+ },
260
+ {
261
+ "name": "constant.numeric.float.decimal.pcb.board",
262
+ "match": "[-+]?\\d*\\.\\d+"
263
+ },
264
+ {
265
+ "include": "#integer"
266
+ },
267
+ {
268
+ "name": "constant.numeric.integer.hex.pcb.board",
269
+ "match": "[-+]?(?:(/)?[A-F0-9]+|0x[A-Fa-f0-9]+)(?=\\s|$)",
270
+ "captures": {
271
+ "1": {
272
+ "name": "punctuation.definition.constant.pcb.board"
273
+ }
274
+ }
275
+ },
276
+ {
277
+ "name": "constant.language.other.pcb.board",
278
+ "match": "(?<=\\s|^)[A-Z]+(?=\\s|$)"
279
+ },
280
+ {
281
+ "name": "variable.parameter.pcb.board",
282
+ "match": "[^$\\s]\\S*"
283
+ },
284
+ {
285
+ "include": "$self"
286
+ }
287
+ ]
288
+ }
289
+ }
290
+ }
@@ -0,0 +1,428 @@
1
+ {
2
+ "name": "KiCad Schematic",
3
+ "scopeName": "source.pcb.schematic",
4
+ "fileTypes": [
5
+ "sch"
6
+ ],
7
+ "firstLineMatch": "^\\s*EESchema\\s+(?:Schematic|-LIBRARY)\\s",
8
+ "patterns": [
9
+ {
10
+ "begin": "\\A(?=<\\?xml\\s+version=\"[\\d.]+\"\\s)",
11
+ "end": "(?=A)B",
12
+ "patterns": [
13
+ {
14
+ "include": "text.xml"
15
+ }
16
+ ],
17
+ "contentName": "source.eagle.pcb.board"
18
+ },
19
+ {
20
+ "begin": "\\A\\s*(?=;|\\()",
21
+ "end": "(?=A)B",
22
+ "patterns": [
23
+ {
24
+ "include": "source.scheme"
25
+ }
26
+ ],
27
+ "contentName": "source.scheme"
28
+ },
29
+ {
30
+ "name": "meta.header.pcb.schematic",
31
+ "begin": "^\\s*(EESchema\\s+(?:Schematic|-LIBRARY)\\s+\\S+.*)\\s*$",
32
+ "end": "(?<=\\$EndDescr)(?=\\s|$)",
33
+ "beginCaptures": {
34
+ "1": {
35
+ "name": "keyword.control.header.pcb.schematic"
36
+ }
37
+ },
38
+ "endCaptures": {
39
+ "1": {
40
+ "name": "keyword.control.header.pcb.schematic"
41
+ },
42
+ "2": {
43
+ "name": "punctuation.definition.header.pcb.schematic"
44
+ }
45
+ },
46
+ "patterns": [
47
+ {
48
+ "match": "^\\s*(LIBS(:))\\s*(.+)",
49
+ "captures": {
50
+ "1": {
51
+ "name": "variable.assignment.libs.pcb.schematic"
52
+ },
53
+ "2": {
54
+ "name": "punctuation.separator.key-value.pcb.schematic"
55
+ },
56
+ "3": {
57
+ "patterns": [
58
+ {
59
+ "match": ",",
60
+ "name": "punctuation.delimiter.list.comma.pcb.schematic"
61
+ },
62
+ {
63
+ "match": "[^\\s,]+",
64
+ "name": "constant.other.lib-name.pcb.schematic"
65
+ }
66
+ ]
67
+ }
68
+ }
69
+ },
70
+ {
71
+ "name": "meta.eelayer.pcb.schematic",
72
+ "begin": "^\\s*(EELAYER)((?:\\s+[-+]?[\\d.]+)*)\\s*$",
73
+ "end": "^\\s*(EELAYER)\\s+(END)\\s*$",
74
+ "beginCaptures": {
75
+ "1": {
76
+ "name": "entity.name.var.pcb.schematic"
77
+ },
78
+ "2": {
79
+ "patterns": [
80
+ {
81
+ "include": "#numbers"
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ "endCaptures": {
87
+ "1": {
88
+ "name": "entity.name.var.pcb.schematic"
89
+ },
90
+ "2": {
91
+ "name": "keyword.control.pcb.schematic"
92
+ }
93
+ },
94
+ "patterns": [
95
+ {
96
+ "include": "$self"
97
+ }
98
+ ]
99
+ },
100
+ {
101
+ "name": "meta.description.pcb.schematic",
102
+ "begin": "^\\s*((\\$)Descr)(?=\\s)",
103
+ "end": "^\\s*((\\$)EndDescr)(?=\\s)",
104
+ "beginCaptures": {
105
+ "1": {
106
+ "name": "keyword.control.section.pcb.schematic"
107
+ },
108
+ "2": {
109
+ "name": "punctuation.section.begin.pcb.schematic"
110
+ }
111
+ },
112
+ "endCaptures": {
113
+ "1": {
114
+ "name": "keyword.control.section.pcb.schematic"
115
+ },
116
+ "2": {
117
+ "name": "punctuation.section.end.pcb.schematic"
118
+ }
119
+ },
120
+ "patterns": [
121
+ {
122
+ "match": "\\G\\s+([A-E][0-9]?)(?=\\s)",
123
+ "captures": {
124
+ "1": {
125
+ "name": "constant.language.paper-size.pcb.schematic"
126
+ }
127
+ }
128
+ },
129
+ {
130
+ "include": "$self"
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ "include": "$self"
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "name": "meta.bitmap.pcb.schematic",
141
+ "begin": "^\\s*((\\$)Bitmap)\\s*$",
142
+ "end": "^\\s*((\\$)EndBitmap)(?=\\s|$)",
143
+ "beginCaptures": {
144
+ "1": {
145
+ "name": "keyword.control.section.pcb.schematic"
146
+ },
147
+ "2": {
148
+ "name": "punctuation.section.begin.pcb.schematic"
149
+ }
150
+ },
151
+ "endCaptures": {
152
+ "1": {
153
+ "name": "keyword.control.section.pcb.schematic"
154
+ },
155
+ "2": {
156
+ "name": "punctuation.section.end.pcb.schematic"
157
+ }
158
+ },
159
+ "patterns": [
160
+ {
161
+ "begin": "^\\s*(Data)\\s*$",
162
+ "end": "^\\s*(EndData)\\s*$",
163
+ "beginCaptures": {
164
+ "1": {
165
+ "name": "keyword.control.data.section.begin.pcb.schematic"
166
+ }
167
+ },
168
+ "endCaptures": {
169
+ "1": {
170
+ "name": "keyword.control.data.section.end.pcb.schematic"
171
+ }
172
+ },
173
+ "contentName": "string.unquoted.heredoc.bytestream.pcb.schematic",
174
+ "patterns": [
175
+ {
176
+ "match": "\\s+((\\$)EndBitmap)\\s*$",
177
+ "name": "comment.ignored.pcb.schematic"
178
+ },
179
+ {
180
+ "name": "invalid.illegal.syntax.pcb.schematic",
181
+ "match": "(?<=\\s|^)(?![A-Fa-f0-9]{2}(?:\\s|$))(\\S+)"
182
+ }
183
+ ]
184
+ },
185
+ {
186
+ "include": "$self"
187
+ }
188
+ ]
189
+ },
190
+ {
191
+ "name": "meta.component.${1:/downcase}.pcb.schematic",
192
+ "begin": "^\\s*(DEF|DRAW)(?:\\s+(\\S+)\\s+(.+))?\\s*$",
193
+ "end": "^\\s*(END\\1)(?=\\s|$)",
194
+ "beginCaptures": {
195
+ "1": {
196
+ "name": "storage.type.class.definition.pcb.schematic"
197
+ },
198
+ "2": {
199
+ "name": "entity.name.var.pcb.schematic"
200
+ },
201
+ "3": {
202
+ "patterns": [
203
+ {
204
+ "include": "#params"
205
+ }
206
+ ]
207
+ }
208
+ },
209
+ "endCaptures": {
210
+ "1": {
211
+ "name": "storage.type.class.definition.pcb.schematic"
212
+ }
213
+ },
214
+ "patterns": [
215
+ {
216
+ "include": "#params"
217
+ }
218
+ ]
219
+ },
220
+ {
221
+ "name": "meta.aliases.pcb.schematic",
222
+ "match": "^\\s*(ALIAS)\\s+(.+)\\s*$",
223
+ "captures": {
224
+ "1": {
225
+ "name": "storage.type.class.alias.pcb.schematic"
226
+ },
227
+ "2": {
228
+ "patterns": [
229
+ {
230
+ "include": "#quotedString"
231
+ },
232
+ {
233
+ "name": "entity.name.var.pcb.schematic",
234
+ "match": "\\S+"
235
+ }
236
+ ]
237
+ }
238
+ }
239
+ },
240
+ {
241
+ "name": "meta.${3:/downcase}.pcb.schematic",
242
+ "begin": "^\\s*((\\$)([A-Za-z]\\w+))\\s*$",
243
+ "end": "^\\s*((\\$)[Ee]nd\\3)(?=\\s|$)",
244
+ "beginCaptures": {
245
+ "1": {
246
+ "name": "keyword.control.section.pcb.schematic"
247
+ },
248
+ "2": {
249
+ "name": "punctuation.section.begin.pcb.schematic"
250
+ }
251
+ },
252
+ "endCaptures": {
253
+ "1": {
254
+ "name": "keyword.control.section.pcb.schematic"
255
+ },
256
+ "2": {
257
+ "name": "punctuation.section.end.pcb.schematic"
258
+ }
259
+ },
260
+ "patterns": [
261
+ {
262
+ "include": "$self"
263
+ }
264
+ ]
265
+ },
266
+ {
267
+ "name": "meta.wire.pcb.schematic",
268
+ "match": "^\\s*(Wire)\\s+(Wire|Bus|Line)\\s+(Line)\\s*$",
269
+ "captures": {
270
+ "1": {
271
+ "name": "entity.name.var.pcb.schematic"
272
+ },
273
+ "2": {
274
+ "name": "entity.name.type.pcb.schematic"
275
+ },
276
+ "3": {
277
+ "name": "constant.language.other.pch.schematic"
278
+ }
279
+ }
280
+ },
281
+ {
282
+ "name": "meta.text.pcb.schematic",
283
+ "begin": "^\\s*(Text)\\s+(\\w+)\\s+(.+)\\s+(?:(~)|(\\w+))\\s*$",
284
+ "end": "^\\s*(\\S.*)$",
285
+ "beginCaptures": {
286
+ "1": {
287
+ "name": "entity.name.var.pcb.schematic"
288
+ },
289
+ "2": {
290
+ "name": "entity.name.type.pcb.schematic"
291
+ },
292
+ "3": {
293
+ "patterns": [
294
+ {
295
+ "include": "$self"
296
+ }
297
+ ]
298
+ },
299
+ "4": {
300
+ "patterns": [
301
+ {
302
+ "include": "#tilde"
303
+ }
304
+ ]
305
+ },
306
+ "5": {
307
+ "name": "constant.language.other.pch.schematic"
308
+ }
309
+ },
310
+ "endCaptures": {
311
+ "0": {
312
+ "name": "string.unquoted.herestring.pcb.schematic"
313
+ }
314
+ }
315
+ },
316
+ {
317
+ "begin": "^\\s*([A-Za-z]\\w*)(?=\\s)",
318
+ "end": "$",
319
+ "beginCaptures": {
320
+ "1": {
321
+ "name": "entity.name.var.pcb.schematic"
322
+ }
323
+ },
324
+ "patterns": [
325
+ {
326
+ "include": "#params"
327
+ }
328
+ ]
329
+ },
330
+ {
331
+ "include": "#shared"
332
+ }
333
+ ],
334
+ "repository": {
335
+ "shared": {
336
+ "patterns": [
337
+ {
338
+ "include": "#comments"
339
+ },
340
+ {
341
+ "include": "#capsConstant"
342
+ },
343
+ {
344
+ "include": "#tilde"
345
+ },
346
+ {
347
+ "include": "#quotedString"
348
+ },
349
+ {
350
+ "include": "#numbers"
351
+ }
352
+ ]
353
+ },
354
+ "params": {
355
+ "patterns": [
356
+ {
357
+ "include": "#upperCaseName"
358
+ },
359
+ {
360
+ "include": "#lowerCaseName"
361
+ },
362
+ {
363
+ "include": "$self"
364
+ }
365
+ ]
366
+ },
367
+ "comments": {
368
+ "match": "^\\s*((#).*$)",
369
+ "captures": {
370
+ "1": {
371
+ "name": "comment.line.number-sign.pcb.schematic"
372
+ },
373
+ "2": {
374
+ "name": "punctuation.definition.comment.pcb.board"
375
+ }
376
+ }
377
+ },
378
+ "upperCaseName": {
379
+ "name": "constant.language.other.pcb.schematic",
380
+ "match": "(?<=\\s)([+#])?[A-Z0-9_]+(?:\\s|$)",
381
+ "captures": {
382
+ "1": {
383
+ "name": "punctuation.definition.constant.pcb.schematic"
384
+ }
385
+ }
386
+ },
387
+ "lowerCaseName": {
388
+ "name": "variable.parameter.identifier.pcb.schematic",
389
+ "match": "(?<=\\s)[A-Za-z_][-\\w]+(?=\\s|$)"
390
+ },
391
+ "numbers": {
392
+ "patterns": [
393
+ {
394
+ "name": "constant.numeric.integer.decimal.pcb.schematic",
395
+ "match": "(?<![-\\w])[-+]?\\d+(?=\\s|$)"
396
+ },
397
+ {
398
+ "name": "constant.numeric.float.decimal.pcb.schematic",
399
+ "match": "(?<![-\\w])[-+]?\\d*\\.\\d+"
400
+ }
401
+ ]
402
+ },
403
+ "quotedString": {
404
+ "name": "string.quoted.double.pcb.schematic",
405
+ "begin": "\"",
406
+ "end": "\"|^|$",
407
+ "beginCaptures": {
408
+ "0": {
409
+ "name": "punctuation.definition.string.begin.pcb.schematic"
410
+ }
411
+ },
412
+ "endCaptures": {
413
+ "0": {
414
+ "name": "punctuation.definition.string.end.pcb.schematic"
415
+ }
416
+ },
417
+ "patterns": [
418
+ {
419
+ "include": "#stringInnards"
420
+ }
421
+ ]
422
+ },
423
+ "tilde": {
424
+ "name": "keyword.operator.pcb.schematic",
425
+ "match": "~"
426
+ }
427
+ }
428
+ }