github-linguist 7.4.0 → 7.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +5 -5
  2. data/grammars/annotation.liquidhaskell.haskell.json +15 -4
  3. data/grammars/hint.haskell.json +15 -4
  4. data/grammars/hint.message.haskell.json +15 -4
  5. data/grammars/hint.type.haskell.json +15 -4
  6. data/grammars/source.abap.json +14 -3
  7. data/grammars/source.apl.json +19 -2
  8. data/grammars/source.ats.json +17 -87
  9. data/grammars/source.ballerina.json +14 -19
  10. data/grammars/source.crystal.json +14 -2
  11. data/grammars/source.csound.json +37 -0
  12. data/grammars/source.css.json +25 -1
  13. data/grammars/source.css.scss.json +1724 -0
  14. data/grammars/source.gf.json +51 -0
  15. data/grammars/source.glsl.json +1 -1
  16. data/grammars/source.hack.json +2523 -0
  17. data/grammars/source.haskell.json +15 -4
  18. data/grammars/source.hc.json +709 -0
  19. data/grammars/source.hsig.json +15 -4
  20. data/grammars/source.hx.json +10 -6
  21. data/grammars/source.jolie.json +1 -1
  22. data/grammars/source.julia.json +114 -6
  23. data/grammars/source.m68k.json +412 -0
  24. data/grammars/source.mcfunction.json +62 -18
  25. data/grammars/source.objectscript.json +309 -0
  26. data/grammars/source.objectscript_class.json +674 -0
  27. data/grammars/source.objectscript_csp.json +19 -0
  28. data/grammars/source.objectscript_macros.json +226 -0
  29. data/grammars/source.powershell.json +21 -57
  30. data/grammars/source.rust.json +1 -1
  31. data/grammars/source.sass.json +836 -142
  32. data/grammars/source.sassdoc.json +346 -0
  33. data/grammars/source.scala.json +110 -10
  34. data/grammars/source.sqf.json +2 -1
  35. data/grammars/source.svelte.json +827 -0
  36. data/grammars/source.ts.json +8 -4
  37. data/grammars/source.tsql.json +507 -0
  38. data/grammars/source.tsx.json +8 -4
  39. data/grammars/source.viml.json +1 -1
  40. data/grammars/source.vtt.json +702 -0
  41. data/grammars/source.wollok.json +100 -0
  42. data/grammars/source.xojo.json +85 -0
  43. data/grammars/source.yara.json +3 -2
  44. data/grammars/source.zeek.json +412 -0
  45. data/grammars/source.zenscript.json +282 -0
  46. data/grammars/source.zig.json +2 -11
  47. data/grammars/text.haml.json +1 -1
  48. data/grammars/text.html.php.blade.json +3 -3
  49. data/grammars/text.html.vue.json +41 -1
  50. data/grammars/text.slim.json +1 -1
  51. data/grammars/text.tex.latex.haskell.json +15 -4
  52. data/grammars/version +1 -1
  53. data/lib/linguist/VERSION +1 -1
  54. data/lib/linguist/blob_helper.rb +5 -10
  55. data/lib/linguist/generated.rb +10 -2
  56. data/lib/linguist/heuristics.yml +14 -3
  57. data/lib/linguist/language.rb +3 -2
  58. data/lib/linguist/languages.json +1 -1
  59. data/lib/linguist/languages.yml +151 -16
  60. data/lib/linguist/samples.json +9844 -1711
  61. data/lib/linguist/samples.rb +8 -5
  62. data/lib/linguist/shebang.rb +6 -0
  63. data/lib/linguist/vendor.yml +3 -0
  64. metadata +25 -10
  65. data/grammars/source.bro.json +0 -403
  66. data/grammars/source.scss.json +0 -1287
@@ -609,41 +609,85 @@
609
609
  "comment": {
610
610
  "patterns": [
611
611
  {
612
- "name": "meta.comment.todo.mcfunction",
613
- "match": "^\\s*(#)\\s*((?:TODO|FIXME|DELETEME))(\\b.*)$",
614
- "captures": {
612
+ "name": "meta.comment.block.mcfunction",
613
+ "begin": "^[ \\t]*((#)(\u003e)((.*)))$",
614
+ "end": "^(?![ \\t]*#)",
615
+ "patterns": [
616
+ {
617
+ "include": "#comment.block"
618
+ }
619
+ ],
620
+ "beginCaptures": {
615
621
  "1": {
616
- "name": "comment.number-sign.mcfunction"
622
+ "name": "comment.block.mcfunction"
617
623
  },
618
624
  "2": {
619
- "name": "markup.bold.mcfunction"
625
+ "name": "markup.list.mcfunction"
620
626
  },
621
627
  "3": {
622
- "name": "comment.number-sign.mcfunction"
628
+ "name": "markup.list.mcfunction"
629
+ },
630
+ "4": {
631
+ "name": "markup.bold.mcfunction"
632
+ },
633
+ "5": {
634
+ "name": "markup.list.mcfunction"
623
635
  }
624
636
  }
625
637
  },
626
638
  {
627
- "name": "meta.comment.annotation.mcfunction",
628
- "match": "^\\s*(#)\\s*(\\@\\w*)(\\b.*)$",
639
+ "name": "meta.comment.line.mcfunction",
640
+ "match": "^[ \\t]*(#.*)$",
641
+ "captures": {
642
+ "1": {
643
+ "name": "comment.line.mcfunction"
644
+ }
645
+ }
646
+ }
647
+ ]
648
+ },
649
+ "comment.block": {
650
+ "patterns": [
651
+ {
652
+ "name": "meta.comment.block_line.mcfunction",
653
+ "begin": "^[ \\t]*((#)[ \\t]*)",
654
+ "end": "$",
655
+ "patterns": [
656
+ {
657
+ "include": "#comment.block.line"
658
+ }
659
+ ],
660
+ "beginCaptures": {
661
+ "1": {
662
+ "name": "comment.block.mcfunction"
663
+ },
664
+ "2": {
665
+ "name": "markup.list.mcfunction"
666
+ }
667
+ }
668
+ }
669
+ ]
670
+ },
671
+ "comment.block.line": {
672
+ "patterns": [
673
+ {
674
+ "name": "meta.comment.block.annotation.mcfunction",
675
+ "match": "((\\@\\w*)\\b.*)$",
629
676
  "captures": {
630
677
  "1": {
631
- "name": "comment.number-sign.mcfunction"
678
+ "name": "comment.block.mcfunction"
632
679
  },
633
680
  "2": {
634
681
  "name": "markup.heading.mcfunction"
635
- },
636
- "3": {
637
- "name": "comment.number-sign.mcfunction"
638
682
  }
639
683
  }
640
684
  },
641
685
  {
642
- "name": "meta.comment.annotation.mcfunction",
643
- "match": "^\\s*(##)\\s*(.*)$",
686
+ "name": "meta.comment.block.heading.mcfunction",
687
+ "match": "((\\#.*))$",
644
688
  "captures": {
645
689
  "1": {
646
- "name": "comment.number-sign.mcfunction"
690
+ "name": "comment.block.mcfunction"
647
691
  },
648
692
  "2": {
649
693
  "name": "markup.heading.mcfunction"
@@ -651,11 +695,11 @@
651
695
  }
652
696
  },
653
697
  {
654
- "name": "meta.comment.mcfunction",
655
- "match": "^\\s*(#.*)$",
698
+ "name": "meta.comment.block.text.mcfunction",
699
+ "match": "(.*)$",
656
700
  "captures": {
657
701
  "1": {
658
- "name": "comment.number-sign.mcfunction"
702
+ "name": "comment.block.mcfunction"
659
703
  }
660
704
  }
661
705
  }
@@ -0,0 +1,309 @@
1
+ {
2
+ "name": "ObjectScript Routine",
3
+ "scopeName": "source.objectscript",
4
+ "patterns": [
5
+ {
6
+ "include": "#comments"
7
+ },
8
+ {
9
+ "include": "#embedded"
10
+ },
11
+ {
12
+ "include": "#constants"
13
+ },
14
+ {
15
+ "include": "#keywords"
16
+ },
17
+ {
18
+ "include": "#macros"
19
+ },
20
+ {
21
+ "include": "#elements"
22
+ }
23
+ ],
24
+ "repository": {
25
+ "commands": {
26
+ "patterns": [
27
+ {
28
+ "match": "(?i)(?\u003c=\\s)\\b(BREAK|B|SET|S|DO|D|KILL|K|GOTO|G|READ|R|WRITE|W|OPEN|O|USE|U|CLOSE|C|CONTINUE|FOR|F|HALT|H|HANG|JOB|J|MERGE|M|NEW|N|QUIT|Q|RETURN|RET|TSTART|TS|TCOMMIT|TC|TROLLBACK|TRO|THROW|VIEW|V|XECUTE|X|ZKILL|ZL|ZNSPACE|ZN|ZTRAP|ZWRITE|ZW|ZZDUMP|ZZWRITE)\\b(?=( (?![=+-]|\\\u0026|\\|)|:|$))",
29
+ "captures": {
30
+ "1": {
31
+ "name": "keyword.control.objectscript"
32
+ }
33
+ }
34
+ },
35
+ {
36
+ "match": "(?i)(?\u003c=\\s)\\b(LOCK|L)\\b(?=( (?![=]|\\\u0026|\\|)|:|$))",
37
+ "captures": {
38
+ "1": {
39
+ "name": "keyword.control.objectscript"
40
+ }
41
+ }
42
+ }
43
+ ]
44
+ },
45
+ "comments": {
46
+ "patterns": [
47
+ {
48
+ "contentName": "comment.multiline.objectscript",
49
+ "begin": "(/\\*)",
50
+ "end": "(.*?\\*/)",
51
+ "beginCaptures": {
52
+ "1": {
53
+ "name": "comment.multiline.objectscript"
54
+ }
55
+ },
56
+ "endCaptures": {
57
+ "1": {
58
+ "name": "comment.multiline.objectscript"
59
+ }
60
+ }
61
+ },
62
+ {
63
+ "name": "comment.line.macro.objectscript",
64
+ "begin": "^\\s*#;",
65
+ "end": "$"
66
+ },
67
+ {
68
+ "name": "comment.endline.objectscript",
69
+ "begin": "//|;",
70
+ "end": "$"
71
+ },
72
+ {
73
+ "name": "comment.endline.macro.objectscript",
74
+ "begin": "##;",
75
+ "end": "$"
76
+ }
77
+ ]
78
+ },
79
+ "constants": {
80
+ "patterns": [
81
+ {
82
+ "name": "string.quoted.double.objectscript",
83
+ "begin": "(\")",
84
+ "end": "(\")",
85
+ "beginCaptures": {
86
+ "1": {
87
+ "name": "punctuation.definition.string.begin.objectscript"
88
+ }
89
+ },
90
+ "endCaptures": {
91
+ "1": {
92
+ "name": "punctuation.definition.string.end.objectscript"
93
+ }
94
+ }
95
+ },
96
+ {
97
+ "name": "constant.numeric.objectscript",
98
+ "match": "\\d+"
99
+ }
100
+ ]
101
+ },
102
+ "control-commands": {
103
+ "patterns": [
104
+ {
105
+ "match": "(?i)(?\u003c=\\s)\\b(IF|I|WHILE|FOR|F|TRY|CATCH|ELSE|E|ELSEIF)\\b(?=( (?![=+-]|\\\u0026|\\|)|:|$))",
106
+ "captures": {
107
+ "1": {
108
+ "name": "keyword.control.objectscript"
109
+ }
110
+ }
111
+ }
112
+ ]
113
+ },
114
+ "elements": {
115
+ "patterns": [
116
+ {
117
+ "name": "entity.name.function",
118
+ "match": "^[a-zA-Z0-9]+"
119
+ },
120
+ {
121
+ "match": "(?i)(##class)(\\()([^)]+)(\\))",
122
+ "captures": {
123
+ "1": {
124
+ "name": "keyword.other"
125
+ },
126
+ "2": {
127
+ "name": "punctuation.objectscript"
128
+ },
129
+ "3": {
130
+ "name": "entity.name.class"
131
+ },
132
+ "4": {
133
+ "name": "punctuation.objectscript"
134
+ }
135
+ }
136
+ },
137
+ {
138
+ "name": "entity.other.attribute-name",
139
+ "match": "%[a-zA-Z0-9]+"
140
+ },
141
+ {
142
+ "name": "entity.other.attribute-name",
143
+ "match": "[i|r]%[a-zA-Z0-9]+"
144
+ },
145
+ {
146
+ "name": "entity.other.attribute-name",
147
+ "match": "[i|r]%\"[^\".]\""
148
+ },
149
+ {
150
+ "match": "(\\.{1,2})(%?[a-zA-Z0-9]+)(?=\\()",
151
+ "captures": {
152
+ "1": {
153
+ "name": "punctuation.objectscript"
154
+ },
155
+ "2": {
156
+ "name": "entity.other.attribute-name"
157
+ }
158
+ }
159
+ },
160
+ {
161
+ "match": "(\\.{1,2})(%?[a-zA-Z0-9]+)(?!\\()",
162
+ "captures": {
163
+ "1": {
164
+ "name": "punctuation.objectscript"
165
+ },
166
+ "2": {
167
+ "name": "entity.other.attribute-name"
168
+ }
169
+ }
170
+ },
171
+ {
172
+ "match": "(\\.{1,2}#)([a-zA-Z0-9]+)",
173
+ "captures": {
174
+ "1": {
175
+ "name": "punctuation.objectscript"
176
+ },
177
+ "2": {
178
+ "name": "meta.parameter.type.variable"
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "name": "variable.name.objectscrip",
184
+ "match": "%?[a-zA-Z0-9]+"
185
+ },
186
+ {
187
+ "name": "variable.name.global.objectscrip",
188
+ "match": "\\^%?[a-zA-Z0-9]+"
189
+ },
190
+ {
191
+ "name": "entity.name.function.system.objectscript",
192
+ "match": "\\$[a-zA-Z0-9]+"
193
+ },
194
+ {
195
+ "name": "entity.name.function.local.objectscript",
196
+ "match": "\\${2}[a-zA-Z0-9]+"
197
+ },
198
+ {
199
+ "name": "meta.preprocessor.objectscript",
200
+ "match": "\\${3}[a-zA-Z0-9]+"
201
+ }
202
+ ]
203
+ },
204
+ "embedded": {
205
+ "patterns": [
206
+ {
207
+ "include": "#embeddedSQL"
208
+ },
209
+ {
210
+ "include": "#embeddedJS"
211
+ }
212
+ ]
213
+ },
214
+ "embeddedJS": {
215
+ "patterns": [
216
+ {
217
+ "contentName": "text.js",
218
+ "begin": "(\u0026js)(\\()",
219
+ "end": "\\)",
220
+ "patterns": [
221
+ {
222
+ "include": "source.js"
223
+ }
224
+ ],
225
+ "beginCaptures": {
226
+ "1": {
227
+ "name": "keyword.special.js.objectscript"
228
+ },
229
+ "2": {
230
+ "name": "punctuation.objectscript"
231
+ }
232
+ }
233
+ }
234
+ ]
235
+ },
236
+ "embeddedSQL": {
237
+ "patterns": [
238
+ {
239
+ "contentName": "meta.embedded.block.sql",
240
+ "begin": "(\u0026sql)(\\()",
241
+ "end": "\\)",
242
+ "patterns": [
243
+ {
244
+ "include": "source.sql"
245
+ }
246
+ ],
247
+ "beginCaptures": {
248
+ "1": {
249
+ "name": "keyword.special.sql.objectscript"
250
+ },
251
+ "2": {
252
+ "name": "punctuation.objectscript"
253
+ }
254
+ }
255
+ }
256
+ ]
257
+ },
258
+ "keywords": {
259
+ "patterns": [
260
+ {
261
+ "include": "#commands"
262
+ },
263
+ {
264
+ "include": "#control-commands"
265
+ }
266
+ ]
267
+ },
268
+ "macros": {
269
+ "patterns": [
270
+ {
271
+ "match": "(?i)(#dim)(\\s)(%?[a-zA-Z0-9]+)(\\s)(?:(As)(\\s)(%?[a-zA-Z0-9.]+))?",
272
+ "captures": {
273
+ "1": {
274
+ "name": "meta.preprocessor.dim.objectscript"
275
+ },
276
+ "2": {
277
+ "name": "whitespace.objectscript"
278
+ },
279
+ "3": {
280
+ "name": "variable.name"
281
+ },
282
+ "4": {
283
+ "name": "whitespace.objectscript"
284
+ },
285
+ "5": {
286
+ "name": "keyword.as.objectscript"
287
+ },
288
+ "6": {
289
+ "name": "whitespace.objectscript"
290
+ },
291
+ "7": {
292
+ "name": "entity.name.class"
293
+ }
294
+ }
295
+ },
296
+ {
297
+ "include": "source.objectscript_macros"
298
+ }
299
+ ]
300
+ },
301
+ "statements": {
302
+ "patterns": [
303
+ {
304
+ "include": "#variables"
305
+ }
306
+ ]
307
+ }
308
+ }
309
+ }
@@ -0,0 +1,674 @@
1
+ {
2
+ "name": "ObjectScript Class",
3
+ "scopeName": "source.objectscript_class",
4
+ "patterns": [
5
+ {
6
+ "include": "#main"
7
+ }
8
+ ],
9
+ "repository": {
10
+ "as": {
11
+ "patterns": [
12
+ {
13
+ "match": "(?i)(\\bAs\\b(?:\\slist of)?)(\\s+)(%?[a-z][0-9a-z]*(?:_[0-9a-z]+)*(?:\\.[a-z][0-9a-z]*(?:_[0-9a-z]+)*)*)",
14
+ "captures": {
15
+ "1": {
16
+ "name": "keyword.objectscript_class"
17
+ },
18
+ "2": {
19
+ "name": "whitespace.objectscript_class"
20
+ },
21
+ "3": {
22
+ "name": "entity.name.class.objectscript_class"
23
+ }
24
+ }
25
+ },
26
+ {
27
+ "begin": "(\\()",
28
+ "end": "(\\))",
29
+ "patterns": [
30
+ {
31
+ "include": "source.objectscript"
32
+ }
33
+ ],
34
+ "beginCaptures": {
35
+ "1": {
36
+ "name": "punctuation.objectscript_class"
37
+ }
38
+ },
39
+ "endCaptures": {
40
+ "1": {
41
+ "name": "punctuation.objectscript_class"
42
+ }
43
+ }
44
+ }
45
+ ]
46
+ },
47
+ "class": {
48
+ "patterns": [
49
+ {
50
+ "include": "#documentation"
51
+ },
52
+ {
53
+ "include": "#comments"
54
+ },
55
+ {
56
+ "begin": "(?i)(^\\bIndex\\b)(\\s+)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)",
57
+ "end": "(^(?=.{0,1})(?:|))",
58
+ "patterns": [
59
+ {
60
+ "include": "#index"
61
+ }
62
+ ],
63
+ "beginCaptures": {
64
+ "1": {
65
+ "name": "keyword.objectscript_class"
66
+ },
67
+ "2": {
68
+ "name": "whitespace.objectscript_class"
69
+ },
70
+ "3": {
71
+ "name": "entity.other.attribute-name.objectscript_class"
72
+ }
73
+ },
74
+ "endCaptures": {
75
+ "1": {
76
+ "name": "whitespace.objectscript_class"
77
+ }
78
+ }
79
+ },
80
+ {
81
+ "match": "(?i)^(\\bForeignKey\\b)(\\s+)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)",
82
+ "captures": {
83
+ "1": {
84
+ "name": "keyword.objectscript_class"
85
+ },
86
+ "2": {
87
+ "name": "whitespace.objectscript_class"
88
+ },
89
+ "3": {
90
+ "name": "entity.other.attribute-name.objectscript_class"
91
+ }
92
+ }
93
+ },
94
+ {
95
+ "begin": "(?i)^(\\bParameter\\b)(\\s+)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)",
96
+ "end": "(;)",
97
+ "patterns": [
98
+ {
99
+ "include": "#parameter"
100
+ }
101
+ ],
102
+ "beginCaptures": {
103
+ "1": {
104
+ "name": "keyword.objectscript_class"
105
+ },
106
+ "2": {
107
+ "name": "whitespace.objectscript_class"
108
+ },
109
+ "3": {
110
+ "name": "entity.other.attribute-name.objectscript_class"
111
+ }
112
+ },
113
+ "endCaptures": {
114
+ "1": {
115
+ "name": "punctuation.objectscript_class"
116
+ }
117
+ }
118
+ },
119
+ {
120
+ "match": "(?i)^(\\bProjection\\b)(\\s+)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)",
121
+ "captures": {
122
+ "1": {
123
+ "name": "keyword.objectscript_class"
124
+ },
125
+ "2": {
126
+ "name": "whitespace.objectscript_class"
127
+ },
128
+ "3": {
129
+ "name": "entity.other.attribute-name.objectscript_class"
130
+ }
131
+ }
132
+ },
133
+ {
134
+ "begin": "(?i)^(\\bProperty\\b)(\\s+)((?:%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)|(?:\"[^\".]+\"))",
135
+ "end": "(;)",
136
+ "patterns": [
137
+ {
138
+ "include": "#property"
139
+ }
140
+ ],
141
+ "beginCaptures": {
142
+ "1": {
143
+ "name": "keyword.objectscript_class"
144
+ },
145
+ "2": {
146
+ "name": "whitespace.objectscript_class"
147
+ },
148
+ "3": {
149
+ "name": "entity.other.attribute-name.objectscript_class"
150
+ }
151
+ },
152
+ "endCaptures": {
153
+ "1": {
154
+ "name": "punctuation.objectscript_class"
155
+ }
156
+ }
157
+ },
158
+ {
159
+ "match": "(?i)^(\\bRelationship\\b)(\\s+)((?:%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)|(?:\"[^\".]+\"))",
160
+ "captures": {
161
+ "1": {
162
+ "name": "keyword.objectscript_class"
163
+ },
164
+ "2": {
165
+ "name": "whitespace.objectscript_class"
166
+ },
167
+ "3": {
168
+ "name": "entity.other.attribute-name.objectscript_class"
169
+ }
170
+ }
171
+ },
172
+ {
173
+ "begin": "(?i)^(\\b(?:Class|Client)?Method\\b)(\\s+)((?:%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)|(?:\"[^\".]+\"))",
174
+ "end": "^(})$",
175
+ "patterns": [
176
+ {
177
+ "include": "#method"
178
+ }
179
+ ],
180
+ "beginCaptures": {
181
+ "1": {
182
+ "name": "keyword.objectscript_class"
183
+ },
184
+ "2": {
185
+ "name": "whitespace.objectscript_class"
186
+ },
187
+ "3": {
188
+ "name": "entity.name.function.objectscript_class"
189
+ }
190
+ },
191
+ "endCaptures": {
192
+ "1": {
193
+ "name": "punctuation.objectscript_class"
194
+ }
195
+ }
196
+ },
197
+ {
198
+ "begin": "(?i)^(\\bQuery\\b)(\\s+)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)",
199
+ "end": "^(})$",
200
+ "patterns": [
201
+ {
202
+ "include": "#query"
203
+ }
204
+ ],
205
+ "beginCaptures": {
206
+ "1": {
207
+ "name": "keyword.objectscript_class"
208
+ },
209
+ "2": {
210
+ "name": "whitespace.objectscript_class"
211
+ },
212
+ "3": {
213
+ "name": "entity.name.function.objectscript_class"
214
+ }
215
+ },
216
+ "endCaptures": {
217
+ "1": {
218
+ "name": "punctuation.objectscript_class"
219
+ }
220
+ }
221
+ },
222
+ {
223
+ "begin": "(?i)^(\\bTrigger\\b)(\\s+)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)",
224
+ "end": "^(})$",
225
+ "patterns": [
226
+ {
227
+ "include": "#trigger"
228
+ }
229
+ ],
230
+ "beginCaptures": {
231
+ "1": {
232
+ "name": "keyword.objectscript_class"
233
+ },
234
+ "2": {
235
+ "name": "whitespace.objectscript_class"
236
+ },
237
+ "3": {
238
+ "name": "entity.name.function.objectscript_class"
239
+ }
240
+ },
241
+ "endCaptures": {
242
+ "1": {
243
+ "name": "punctuation.objectscript_class"
244
+ }
245
+ }
246
+ },
247
+ {
248
+ "begin": "(?i)^(\\XData\\b)(\\s+)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)",
249
+ "end": "^(})$",
250
+ "patterns": [
251
+ {
252
+ "include": "#xdata"
253
+ }
254
+ ],
255
+ "beginCaptures": {
256
+ "1": {
257
+ "name": "keyword.objectscript_class"
258
+ },
259
+ "2": {
260
+ "name": "whitespace.objectscript_class"
261
+ },
262
+ "3": {
263
+ "name": "identifier.objectscript_class"
264
+ }
265
+ },
266
+ "endCaptures": {
267
+ "1": {
268
+ "name": "punctuation.objectscript_class"
269
+ }
270
+ }
271
+ },
272
+ {
273
+ "begin": "(?i)^(\\Storage\\b)(\\s+)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)",
274
+ "end": "^(})$",
275
+ "patterns": [
276
+ {
277
+ "include": "#storage"
278
+ }
279
+ ],
280
+ "beginCaptures": {
281
+ "1": {
282
+ "name": "keyword.objectscript_class"
283
+ },
284
+ "2": {
285
+ "name": "whitespace.objectscript_class"
286
+ },
287
+ "3": {
288
+ "name": "identifier.objectscript_class"
289
+ }
290
+ },
291
+ "endCaptures": {
292
+ "1": {
293
+ "name": "punctuation.objectscript_class"
294
+ }
295
+ }
296
+ }
297
+ ]
298
+ },
299
+ "code": {
300
+ "patterns": [
301
+ {
302
+ "contentName": "meta.embedded.block.objectscript",
303
+ "begin": "^({)",
304
+ "end": "^(?=})",
305
+ "patterns": [
306
+ {
307
+ "include": "source.objectscript"
308
+ }
309
+ ],
310
+ "beginCaptures": {
311
+ "1": {
312
+ "name": "punctuation.objectscript_class"
313
+ }
314
+ }
315
+ }
316
+ ]
317
+ },
318
+ "comments": {
319
+ "patterns": [
320
+ {
321
+ "contentName": "comment.objectscript_class",
322
+ "begin": "(/\\*)",
323
+ "end": "(.*?\\*/)",
324
+ "beginCaptures": {
325
+ "1": {
326
+ "name": "comment.objectscript_class"
327
+ }
328
+ },
329
+ "endCaptures": {
330
+ "1": {
331
+ "name": "comment.objectscript_class"
332
+ }
333
+ }
334
+ },
335
+ {
336
+ "name": "comment.objectscript_class",
337
+ "match": "(^\\s*// .*)"
338
+ }
339
+ ]
340
+ },
341
+ "documentation": {
342
+ "patterns": [
343
+ {
344
+ "contentName": "comment.block.documentation.objectscript_class",
345
+ "begin": "(^/// .*)",
346
+ "end": "(^(?=.{0,1})(?:|))",
347
+ "beginCaptures": {
348
+ "1": {
349
+ "name": "comment.block.documentation.objectscript_class"
350
+ }
351
+ },
352
+ "endCaptures": {
353
+ "1": {
354
+ "name": "whitespace.objectscript_class"
355
+ }
356
+ }
357
+ }
358
+ ]
359
+ },
360
+ "formal_spec": {
361
+ "patterns": [
362
+ {
363
+ "contentName": "source.objectscript_class",
364
+ "begin": "(\\()",
365
+ "end": "(\\))",
366
+ "patterns": [
367
+ {
368
+ "include": "#as"
369
+ },
370
+ {
371
+ "name": "variable.name.objectscrip",
372
+ "match": "[a-zA-Z][a-zA-Z0-9]*"
373
+ },
374
+ {
375
+ "include": "source.objectscript#constants"
376
+ }
377
+ ],
378
+ "beginCaptures": {
379
+ "1": {
380
+ "name": "punctuation.objectscript_class"
381
+ }
382
+ },
383
+ "endCaptures": {
384
+ "1": {
385
+ "name": "punctuation.objectscript_class"
386
+ }
387
+ }
388
+ }
389
+ ]
390
+ },
391
+ "index": {
392
+ "patterns": [
393
+ {
394
+ "match": "(\\bOn\\b)(\\s+)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*(?:\\.[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)*)",
395
+ "captures": {
396
+ "1": {
397
+ "name": "keyword.objectscript_class"
398
+ },
399
+ "2": {
400
+ "name": "whitespace.objectscript_class"
401
+ },
402
+ "3": {
403
+ "name": "entity.other.attribute-name.objectscript_class"
404
+ }
405
+ }
406
+ }
407
+ ]
408
+ },
409
+ "main": {
410
+ "patterns": [
411
+ {
412
+ "include": "#documentation"
413
+ },
414
+ {
415
+ "include": "#comments"
416
+ },
417
+ {
418
+ "match": "(?i)^(\\Include\\b)(\\s+)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*(?:\\.[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)*)",
419
+ "captures": {
420
+ "1": {
421
+ "name": "keyword.objectscript_class"
422
+ },
423
+ "2": {
424
+ "name": "whitespace.objectscript_class"
425
+ },
426
+ "3": {
427
+ "name": "identifier.objectscript_class"
428
+ }
429
+ }
430
+ },
431
+ {
432
+ "match": "(?i)^(\\bClass\\b)(\\s)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*(?:\\.[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)*)",
433
+ "captures": {
434
+ "1": {
435
+ "name": "keyword.objectscript_class"
436
+ },
437
+ "2": {
438
+ "name": "whitespace.objectscript_class"
439
+ },
440
+ "3": {
441
+ "name": "entity.name.class.objectscript_class"
442
+ }
443
+ }
444
+ },
445
+ {
446
+ "match": "(?i)(\\bExtends\\b)(\\s)(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*(?:\\.[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)*)",
447
+ "captures": {
448
+ "1": {
449
+ "name": "keyword.objectscript_class"
450
+ },
451
+ "2": {
452
+ "name": "whitespace.objectscript_class"
453
+ },
454
+ "3": {
455
+ "name": "entity.name.class.objectscript_class"
456
+ }
457
+ }
458
+ },
459
+ {
460
+ "begin": "(?i)(\\bExtends\\b)(\\s+)(\\()",
461
+ "end": "(\\))",
462
+ "patterns": [
463
+ {
464
+ "match": "(%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*(?:\\.[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)*)",
465
+ "captures": {
466
+ "1": {
467
+ "name": "entity.name.class.objectscript_class"
468
+ }
469
+ }
470
+ }
471
+ ],
472
+ "beginCaptures": {
473
+ "1": {
474
+ "name": "keyword.objectscript_class"
475
+ },
476
+ "2": {
477
+ "name": "whitespace.objectscript_class"
478
+ },
479
+ "3": {
480
+ "name": "punctuation.objectscript_class"
481
+ }
482
+ },
483
+ "endCaptures": {
484
+ "1": {
485
+ "name": "punctuation.objectscript_class"
486
+ }
487
+ }
488
+ },
489
+ {
490
+ "begin": "({)",
491
+ "end": "(})",
492
+ "patterns": [
493
+ {
494
+ "include": "#class"
495
+ }
496
+ ],
497
+ "beginCaptures": {
498
+ "1": {
499
+ "name": "punctuation.objectscript_class"
500
+ }
501
+ },
502
+ "endCaptures": {
503
+ "1": {
504
+ "name": "punctuation.objectscript_class"
505
+ }
506
+ }
507
+ }
508
+ ]
509
+ },
510
+ "method": {
511
+ "patterns": [
512
+ {
513
+ "include": "#formal_spec"
514
+ },
515
+ {
516
+ "include": "#as"
517
+ },
518
+ {
519
+ "include": "#params"
520
+ },
521
+ {
522
+ "include": "#code"
523
+ }
524
+ ]
525
+ },
526
+ "parameter": {
527
+ "patterns": [
528
+ {
529
+ "include": "#as"
530
+ },
531
+ {
532
+ "include": "#parameter_value"
533
+ }
534
+ ]
535
+ },
536
+ "parameter_value": {
537
+ "patterns": [
538
+ {
539
+ "include": "source.objectscript#constants"
540
+ }
541
+ ]
542
+ },
543
+ "params": {
544
+ "patterns": [
545
+ {
546
+ "contentName": "source.objectscript_class",
547
+ "begin": "(\\[)",
548
+ "end": "(\\])",
549
+ "beginCaptures": {
550
+ "1": {
551
+ "name": "punctuation.objectscript_class"
552
+ }
553
+ },
554
+ "endCaptures": {
555
+ "1": {
556
+ "name": "punctuation.objectscript_class"
557
+ }
558
+ }
559
+ }
560
+ ]
561
+ },
562
+ "property": {
563
+ "patterns": [
564
+ {
565
+ "include": "#as"
566
+ },
567
+ {
568
+ "include": "#params"
569
+ }
570
+ ]
571
+ },
572
+ "query": {
573
+ "patterns": [
574
+ {
575
+ "include": "#formal_spec"
576
+ },
577
+ {
578
+ "include": "#as"
579
+ },
580
+ {
581
+ "include": "#params"
582
+ },
583
+ {
584
+ "include": "#sql"
585
+ }
586
+ ]
587
+ },
588
+ "sql": {
589
+ "patterns": [
590
+ {
591
+ "contentName": "meta.embedded.block.sql",
592
+ "begin": "^({)",
593
+ "end": "^(?=})",
594
+ "patterns": [
595
+ {
596
+ "include": "source.sql"
597
+ }
598
+ ],
599
+ "beginCaptures": {
600
+ "1": {
601
+ "name": "punctuation.objectscript_class"
602
+ }
603
+ }
604
+ }
605
+ ]
606
+ },
607
+ "storage": {
608
+ "patterns": [
609
+ {
610
+ "include": "#params"
611
+ },
612
+ {
613
+ "include": "#xml"
614
+ }
615
+ ]
616
+ },
617
+ "trigger": {
618
+ "patterns": [
619
+ {
620
+ "include": "#params"
621
+ },
622
+ {
623
+ "include": "#code"
624
+ }
625
+ ]
626
+ },
627
+ "xdata": {
628
+ "patterns": [
629
+ {
630
+ "include": "#params"
631
+ },
632
+ {
633
+ "include": "#xdataStyle"
634
+ }
635
+ ]
636
+ },
637
+ "xdataStyle": {
638
+ "begin": "^({)",
639
+ "end": "^(?=})",
640
+ "patterns": [
641
+ {
642
+ "include": "text.xml"
643
+ },
644
+ {
645
+ "include": "source.css"
646
+ }
647
+ ],
648
+ "beginCaptures": {
649
+ "1": {
650
+ "name": "punctuation.objectscript_class"
651
+ }
652
+ }
653
+ },
654
+ "xml": {
655
+ "patterns": [
656
+ {
657
+ "contentName": "text.xml",
658
+ "begin": "^({)",
659
+ "end": "^(?=})",
660
+ "patterns": [
661
+ {
662
+ "include": "text.xml"
663
+ }
664
+ ],
665
+ "beginCaptures": {
666
+ "1": {
667
+ "name": "punctuation.objectscript_class"
668
+ }
669
+ }
670
+ }
671
+ ]
672
+ }
673
+ }
674
+ }