github-linguist 4.8.8 → 4.8.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/hint.haskell.json +1123 -0
  3. data/grammars/hint.message.haskell.json +1147 -0
  4. data/grammars/hint.type.haskell.json +1120 -0
  5. data/grammars/source.asn.json +59 -0
  6. data/grammars/source.blitzmax.json +0 -2
  7. data/grammars/source.bsl.json +372 -0
  8. data/grammars/source.c++.json +67 -0
  9. data/grammars/source.c2hs.json +27 -0
  10. data/grammars/source.cabal.json +66 -0
  11. data/grammars/source.coffee.json +6 -5
  12. data/grammars/source.crystal.json +0 -11
  13. data/grammars/source.csound-score.json +3 -3
  14. data/grammars/source.csound.json +51 -15
  15. data/grammars/source.css.json +1 -1
  16. data/grammars/source.css.less.json +9 -5
  17. data/grammars/source.cython.json +42 -193
  18. data/grammars/source.d.json +7 -7
  19. data/grammars/source.elixir.json +2 -2
  20. data/grammars/source.forth.json +0 -2
  21. data/grammars/source.graphql.json +8 -2
  22. data/grammars/source.haskell.json +1089 -323
  23. data/grammars/source.hsc2hs.json +12 -0
  24. data/grammars/source.ideal.json +356 -0
  25. data/grammars/source.java.json +3 -0
  26. data/grammars/source.js.json +262 -131
  27. data/grammars/source.js.jsx.json +848 -256
  28. data/grammars/source.lsl.json +51 -103
  29. data/grammars/source.objc.json +1 -1
  30. data/grammars/source.parrot.pir.json +49 -15
  31. data/grammars/source.pic.json +868 -0
  32. data/grammars/source.purescript.json +114 -90
  33. data/grammars/source.python.json +11 -9
  34. data/grammars/source.regexp.babel.json +1 -1
  35. data/grammars/source.renpy.json +7 -7
  36. data/grammars/source.rexx.json +59 -0
  37. data/grammars/source.sas.json +8 -75
  38. data/grammars/source.sdbl.json +97 -0
  39. data/grammars/source.shell.json +1 -0
  40. data/grammars/source.smali.json +2 -2
  41. data/grammars/source.sqf.json +11 -11
  42. data/grammars/source.stan.json +60 -25
  43. data/grammars/source.tla.json +18 -6
  44. data/grammars/source.toc.json +5 -1
  45. data/grammars/source.ts.json +134 -31
  46. data/grammars/source.tsx.json +134 -31
  47. data/grammars/source.vhdl.json +150 -117
  48. data/grammars/source.viml.json +4 -4
  49. data/grammars/source.xquery.json +23 -5
  50. data/grammars/source.yaml.json +35 -19
  51. data/grammars/text.html.handlebars.json +2 -2
  52. data/grammars/text.html.php.blade.json +1 -1
  53. data/grammars/text.html.twig.json +1 -4
  54. data/grammars/text.html.vue.json +41 -1
  55. data/grammars/text.restructuredtext.json +56 -1
  56. data/grammars/text.roff.json +5089 -0
  57. data/grammars/text.runoff.json +321 -0
  58. data/grammars/text.slim.json +126 -105
  59. data/grammars/text.tex.latex.haskell.json +1335 -21
  60. data/lib/linguist/heuristics.rb +8 -0
  61. data/lib/linguist/languages.json +1 -1
  62. data/lib/linguist/languages.yml +58 -3
  63. data/lib/linguist/samples.json +5257 -76
  64. data/lib/linguist/version.rb +1 -1
  65. metadata +16 -4
  66. data/grammars/source.man.json +0 -53
  67. data/grammars/text.groff.json +0 -113
@@ -3,8 +3,6 @@
3
3
  "esl",
4
4
  "lsl"
5
5
  ],
6
- "foldingStartMarker": "\\{\\s*$",
7
- "foldingStopMarker": "^\\s*\\}",
8
6
  "keyEquivalent": "^~L",
9
7
  "name": "Second Life LSL",
10
8
  "patterns": [
@@ -12,9 +10,25 @@
12
10
  "include": "#round-brackets"
13
11
  },
14
12
  {
15
- "begin": "//",
16
- "end": "$\\n?",
17
- "name": "comment.line.double-slash.lsl"
13
+ "begin": "(^[ \\t]+)?(?=//)",
14
+ "beginCaptures": {
15
+ "1": {
16
+ "name": "punctuation.whitespace.comment.leading.lsl"
17
+ }
18
+ },
19
+ "end": "(?!\\G)",
20
+ "patterns": [
21
+ {
22
+ "begin": "//",
23
+ "beginCaptures": {
24
+ "0": {
25
+ "name": "punctuation.definition.comment.lsl"
26
+ }
27
+ },
28
+ "end": "\\n",
29
+ "name": "comment.line.double-slash.lsl"
30
+ }
31
+ ]
18
32
  },
19
33
  {
20
34
  "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(|-)?[0-9]+)?)\\b",
@@ -60,117 +74,51 @@
60
74
  },
61
75
  {
62
76
  "begin": "\"",
77
+ "beginCaptures": {
78
+ "0": {
79
+ "name": "punctuation.definition.string.begin.lsl"
80
+ }
81
+ },
63
82
  "end": "\"",
83
+ "endCaptures": {
84
+ "0": {
85
+ "name": "punctuation.definition.string.end.lsl"
86
+ }
87
+ },
64
88
  "name": "string.quoted.double.lsl",
65
89
  "patterns": [
66
90
  {
67
- "match": "\\\\[a-zA-Z]",
68
- "name": "constant.character.untitled"
91
+ "match": "\\\\[\\\\\"snt]",
92
+ "name": "constant.character.escape.lsl"
93
+ },
94
+ {
95
+ "match": "\\\\([u]\\h{4}|[U]\\h{8})",
96
+ "name": "constant.character.escape.unicode.lsl"
69
97
  }
70
98
  ]
71
- },
72
- {
73
- "include": "#leading-space"
74
99
  }
75
100
  ],
76
101
  "repository": {
77
- "leading-space": {
78
- "patterns": [
79
- {
80
- "begin": "^(?=(\\t| ))",
81
- "end": "(?=[^\\t\\s])",
82
- "name": "meta.leading-tabs",
83
- "patterns": [
84
- {
85
- "captures": {
86
- "1": {
87
- "name": "meta.odd-tab.group1.spaces"
88
- },
89
- "10": {
90
- "name": "meta.even-tab.group10.spaces"
91
- },
92
- "11": {
93
- "name": "meta.odd-tab.group11.spaces"
94
- },
95
- "2": {
96
- "name": "meta.even-tab.group2.spaces"
97
- },
98
- "3": {
99
- "name": "meta.odd-tab.group3.spaces"
100
- },
101
- "4": {
102
- "name": "meta.even-tab.group4.spaces"
103
- },
104
- "5": {
105
- "name": "meta.odd-tab.group5.spaces"
106
- },
107
- "6": {
108
- "name": "meta.even-tab.group6.spaces"
109
- },
110
- "7": {
111
- "name": "meta.odd-tab.group7.spaces"
112
- },
113
- "8": {
114
- "name": "meta.even-tab.group8.spaces"
115
- },
116
- "9": {
117
- "name": "meta.odd-tab.group9.spaces"
118
- }
119
- },
120
- "match": "( )( )?( )?( )?( )?( )?( )?( )?( )?( )?( )?"
121
- },
122
- {
123
- "captures": {
124
- "1": {
125
- "name": "meta.odd-tab.group1.tab"
126
- },
127
- "10": {
128
- "name": "meta.even-tab.group10.tab"
129
- },
130
- "11": {
131
- "name": "meta.odd-tab.group11.tab"
132
- },
133
- "2": {
134
- "name": "meta.even-tab.group2.tab"
135
- },
136
- "3": {
137
- "name": "meta.odd-tab.group3.tab"
138
- },
139
- "4": {
140
- "name": "meta.even-tab.group4.tab"
141
- },
142
- "5": {
143
- "name": "meta.odd-tab.group5.tab"
144
- },
145
- "6": {
146
- "name": "meta.even-tab.group6.tab"
147
- },
148
- "7": {
149
- "name": "meta.odd-tab.group7.tab"
150
- },
151
- "8": {
152
- "name": "meta.even-tab.group8.tab"
153
- },
154
- "9": {
155
- "name": "meta.odd-tab.group9.tab"
156
- }
157
- },
158
- "match": "(\\t)(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?"
159
- }
160
- ]
161
- }
162
- ]
163
- },
164
102
  "round-brackets": {
165
103
  "patterns": [
166
104
  {
167
- "begin": "(\\{)",
105
+ "begin": "\\{",
106
+ "beginCaptures": {
107
+ "0": {
108
+ "name": "punctuation.section.scope.begin.lsl"
109
+ }
110
+ },
168
111
  "captures": {
169
112
  "1": {
170
113
  "name": "meta.brace.curly"
171
114
  }
172
115
  },
173
- "end": "(\\}\\n?)",
116
+ "end": "(\\})\\n?",
117
+ "endCaptures": {
118
+ "1": {
119
+ "name": "punctuation.section.scope.end.lsl"
120
+ }
121
+ },
174
122
  "name": "meta.group.braces.curly",
175
123
  "patterns": [
176
124
  {
@@ -179,13 +127,13 @@
179
127
  ]
180
128
  },
181
129
  {
182
- "begin": "(\\()",
130
+ "begin": "\\(",
183
131
  "captures": {
184
132
  "1": {
185
133
  "name": "meta.brace.round"
186
134
  }
187
135
  },
188
- "end": "(\\))",
136
+ "end": "\\)",
189
137
  "name": "meta.group.braces.round",
190
138
  "patterns": [
191
139
  {
@@ -194,13 +142,13 @@
194
142
  ]
195
143
  },
196
144
  {
197
- "begin": "(\\[)",
145
+ "begin": "\\[",
198
146
  "captures": {
199
147
  "1": {
200
148
  "name": "meta.brace.square"
201
149
  }
202
150
  },
203
- "end": "(\\])",
151
+ "end": "\\]",
204
152
  "name": "meta.group.braces.square",
205
153
  "patterns": [
206
154
  {
@@ -848,7 +848,7 @@
848
848
  "name": "meta.property-with-attributes.objc",
849
849
  "patterns": [
850
850
  {
851
- "match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|atomic|nonatomic|strong|weak)\\b",
851
+ "match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|atomic|nonatomic|strong|weak|nullable|nonnull)\\b",
852
852
  "name": "keyword.other.property.attribute"
853
853
  }
854
854
  ]
@@ -2,30 +2,48 @@
2
2
  "fileTypes": [
3
3
  "pir"
4
4
  ],
5
- "foldingStartMarker": "\\.sub",
6
- "foldingStopMarker": "\\.end",
7
5
  "keyEquivalent": "^~P",
8
6
  "name": "Parrot PIR",
9
7
  "patterns": [
10
8
  {
11
9
  "begin": "\"",
10
+ "beginCaptures": {
11
+ "0": {
12
+ "name": "punctuation.definition.string.begin.pir"
13
+ }
14
+ },
12
15
  "end": "\"",
16
+ "endCaptures": {
17
+ "0": {
18
+ "name": "punctuation.definition.string.end.pir"
19
+ }
20
+ },
13
21
  "name": "string.quoted.double.pir",
14
22
  "patterns": [
15
23
  {
16
24
  "match": "\\\\.",
17
- "name": "constant.character.escaped.pir"
25
+ "name": "constant.character.escape.pir"
18
26
  }
19
27
  ]
20
28
  },
21
29
  {
22
30
  "begin": "'",
31
+ "beginCaptures": {
32
+ "0": {
33
+ "name": "punctuation.definition.string.begin.pir"
34
+ }
35
+ },
23
36
  "end": "'",
37
+ "endCaptures": {
38
+ "0": {
39
+ "name": "punctuation.definition.string.end.pir"
40
+ }
41
+ },
24
42
  "name": "string.quoted.single.pir",
25
43
  "patterns": [
26
44
  {
27
45
  "match": "\\\\.",
28
- "name": "constant.character.escaped.pir"
46
+ "name": "constant.character.escape.pir"
29
47
  }
30
48
  ]
31
49
  },
@@ -70,14 +88,6 @@
70
88
  "match": "!|-|~",
71
89
  "name": "keyword.operator.unary.pir"
72
90
  },
73
- {
74
- "match": "\\+|-|/|\\*\\*|\\*|%|<<|>>|<>|&&|\\|\\||~~|\\||&|~|\\.",
75
- "name": "keyword.operator.binary.ruby"
76
- },
77
- {
78
- "match": "\\+=|-=|\\=|%=|\\*=|\\.=|&=|\\|=|~=|<<=|>>=|<>=",
79
- "name": "keyword.operator.assign.ruby"
80
- },
81
91
  {
82
92
  "captures": {
83
93
  "1": {
@@ -103,9 +113,33 @@
103
113
  "name": "meta.function.pir"
104
114
  },
105
115
  {
106
- "comment": "Only allow word characters and punctuation to avoid false positives, since the availability of comments depend on regexp flags.",
107
- "match": "(#.+*|#\\s*[a-zA-z0-9_:,.; ]+)$",
108
- "name": "comment.line.pir"
116
+ "match": "\\+|-|/|\\*\\*|\\*|%|<<|>>|<>|&&|\\|\\||~~|\\||&|~|\\.",
117
+ "name": "keyword.operator.binary.pir"
118
+ },
119
+ {
120
+ "match": "\\+=|-=|\\=|%=|\\*=|\\.=|&=|\\|=|~=|<<=|>>=|<>=",
121
+ "name": "keyword.operator.assign.pir"
122
+ },
123
+ {
124
+ "begin": "(^[ \\t]+)?(?=#)",
125
+ "beginCaptures": {
126
+ "1": {
127
+ "name": "punctuation.whitespace.comment.leading.pir"
128
+ }
129
+ },
130
+ "end": "(?!\\G)",
131
+ "patterns": [
132
+ {
133
+ "begin": "#",
134
+ "beginCaptures": {
135
+ "0": {
136
+ "name": "punctuation.definition.comment.pir"
137
+ }
138
+ },
139
+ "end": "\\n",
140
+ "name": "comment.line.number-sign.pir"
141
+ }
142
+ ]
109
143
  },
110
144
  {
111
145
  "match": "\\b([_a-zA-Z]([_a-zA-Z0-9]+)?)\\b",
@@ -0,0 +1,868 @@
1
+ {
2
+ "name": "Pic",
3
+ "scopeName": "source.pic",
4
+ "fileTypes": [
5
+ "chem",
6
+ "pic"
7
+ ],
8
+ "firstLineMatch": "^#[!/].*\\bpic2plot\\b",
9
+ "patterns": [
10
+ {
11
+ "include": "#tags"
12
+ },
13
+ {
14
+ "begin": "^(?=[.'][ \t]*(?:\\w|\\\\))",
15
+ "end": "(?<!\\\\)$|(\\\\\".*)$",
16
+ "patterns": [
17
+ {
18
+ "include": "text.roff"
19
+ }
20
+ ],
21
+ "endCaptures": {
22
+ "1": {
23
+ "patterns": [
24
+ {
25
+ "include": "text.roff"
26
+ }
27
+ ]
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "include": "#main"
33
+ }
34
+ ],
35
+ "repository": {
36
+ "main": {
37
+ "patterns": [
38
+ {
39
+ "include": "#comment"
40
+ },
41
+ {
42
+ "include": "#keywords"
43
+ },
44
+ {
45
+ "include": "#backref"
46
+ },
47
+ {
48
+ "include": "#macros"
49
+ },
50
+ {
51
+ "include": "#string"
52
+ },
53
+ {
54
+ "include": "#number"
55
+ },
56
+ {
57
+ "include": "#escaped-newline"
58
+ },
59
+ {
60
+ "include": "#operators"
61
+ },
62
+ {
63
+ "include": "#brackets"
64
+ },
65
+ {
66
+ "include": "#punctuation"
67
+ },
68
+ {
69
+ "include": "#primitives"
70
+ },
71
+ {
72
+ "include": "#attributes"
73
+ },
74
+ {
75
+ "include": "#globals"
76
+ },
77
+ {
78
+ "include": "#function-call"
79
+ },
80
+ {
81
+ "include": "#label"
82
+ },
83
+ {
84
+ "include": "#name"
85
+ }
86
+ ]
87
+ },
88
+ "attributes": {
89
+ "name": "variable.other.property.$1.pic",
90
+ "match": "(?x)\\b\n(cw|dashed|diameter|diam|dotted|down|height|ht|invisible\n|invis|left|radius|rad|right|same|up|width|wid)\\b"
91
+ },
92
+ "backref": {
93
+ "name": "variable.language.backreference.pic",
94
+ "match": "\\b(last|(?:\\d*1[1-3]th|\\d*0th|(?:(?!11st)\\d)*1st|\\d*2nd|(?:(?!13rd)\\d*)3rd|\\d*[4-9]th)(?:[ \t]+last)?)\\b",
95
+ "captures": {
96
+ "0": {
97
+ "name": "entity.name.pic"
98
+ }
99
+ }
100
+ },
101
+ "boolean": {
102
+ "name": "constant.boolean.$1.dformat.pic",
103
+ "match": "\\b(true|false|on|off)\\b"
104
+ },
105
+ "brackets": {
106
+ "patterns": [
107
+ {
108
+ "begin": "\\(",
109
+ "end": "(?=\\))|^(?=\\.P[EF]\\b)",
110
+ "patterns": [
111
+ {
112
+ "include": "#main"
113
+ }
114
+ ],
115
+ "beginCaptures": {
116
+ "0": {
117
+ "name": "punctuation.definition.bracket.round.pic"
118
+ }
119
+ }
120
+ },
121
+ {
122
+ "begin": "\\[",
123
+ "end": "(?=\\])|^(?=\\.P[EF]\\b)",
124
+ "patterns": [
125
+ {
126
+ "include": "#main"
127
+ }
128
+ ],
129
+ "beginCaptures": {
130
+ "0": {
131
+ "name": "punctuation.definition.bracket.square.pic"
132
+ }
133
+ }
134
+ },
135
+ {
136
+ "begin": "\\{",
137
+ "end": "(?=\\})|^(?=\\.P[EF]\\b)",
138
+ "patterns": [
139
+ {
140
+ "include": "#main"
141
+ }
142
+ ],
143
+ "beginCaptures": {
144
+ "0": {
145
+ "name": "punctuation.definition.bracket.curly.pic"
146
+ }
147
+ }
148
+ }
149
+ ]
150
+ },
151
+ "chem": {
152
+ "patterns": [
153
+ {
154
+ "include": "#label"
155
+ },
156
+ {
157
+ "name": "keyword.function.bond.pic.chem",
158
+ "match": "\\b((?:(?:double|triple|front|back)[ \t]+)?\\bbond)\\b",
159
+ "captures": {
160
+ "0": {
161
+ "name": "support.function.pic.chem"
162
+ },
163
+ "1": {
164
+ "name": "entity.name.function.pic.chem"
165
+ }
166
+ }
167
+ },
168
+ {
169
+ "name": "keyword.function.ring.pic.chem",
170
+ "match": "(?:\\baromatic[ \t]+)?\\b(?:benzene|(?:flat)?ring\\d*)",
171
+ "captures": {
172
+ "0": {
173
+ "name": "entity.name.function.pic.chem"
174
+ }
175
+ }
176
+ },
177
+ {
178
+ "name": "keyword.operator.direction.pic.chem",
179
+ "match": "\\b(pointing)\\b"
180
+ },
181
+ {
182
+ "name": "keyword.function.set-size.pic.chem",
183
+ "match": "\\b(size)\\b[ \t]*(\\d+)",
184
+ "captures": {
185
+ "1": {
186
+ "name": "entity.name.function.pic.chem"
187
+ },
188
+ "2": {
189
+ "name": "constant.numeric.parameter.pic.chem"
190
+ }
191
+ }
192
+ },
193
+ {
194
+ "name": "keyword.control.branch-point.pic.chem",
195
+ "match": "\\bBP\\b"
196
+ },
197
+ {
198
+ "name": "string.unquoted.group-name.pic.chem",
199
+ "match": "(?=[A-Z])(?!BP)([\\w\\(\\).]+)",
200
+ "captures": {
201
+ "1": {
202
+ "patterns": [
203
+ {
204
+ "include": "#punctuation"
205
+ },
206
+ {
207
+ "match": "\\.",
208
+ "name": "punctuation.delimiter.period.full-stop.chem.pic"
209
+ }
210
+ ]
211
+ }
212
+ }
213
+ },
214
+ {
215
+ "begin": "\\(",
216
+ "end": "(?=\\))|^(?=\\.P[EF]\\b|^[.']\\s*cend\\b)",
217
+ "patterns": [
218
+ {
219
+ "include": "#chem"
220
+ }
221
+ ],
222
+ "beginCaptures": {
223
+ "0": {
224
+ "name": "punctuation.definition.bracket.round.chem.pic"
225
+ }
226
+ }
227
+ },
228
+ {
229
+ "begin": "\\[",
230
+ "end": "(?=\\])|^(?=\\.P[EF]\\b|^[.']\\s*cend\\b)",
231
+ "patterns": [
232
+ {
233
+ "include": "#chem"
234
+ }
235
+ ],
236
+ "beginCaptures": {
237
+ "0": {
238
+ "name": "punctuation.definition.bracket.square.chem.pic"
239
+ }
240
+ }
241
+ },
242
+ {
243
+ "begin": "\\{",
244
+ "end": "(?=\\})|^(?=\\.P[EF]\\b|^[.']\\s*cend\\b)",
245
+ "patterns": [
246
+ {
247
+ "include": "#chem"
248
+ }
249
+ ],
250
+ "beginCaptures": {
251
+ "0": {
252
+ "name": "punctuation.definition.bracket.curly.chem.pic"
253
+ }
254
+ }
255
+ },
256
+ {
257
+ "include": "$self"
258
+ }
259
+ ]
260
+ },
261
+ "comment": {
262
+ "name": "comment.line.pic",
263
+ "begin": "#",
264
+ "end": "$",
265
+ "beginCaptures": {
266
+ "0": {
267
+ "name": "punctuation.definition.comment.pic"
268
+ }
269
+ }
270
+ },
271
+ "dformat": {
272
+ "patterns": [
273
+ {
274
+ "include": "#pic-line"
275
+ },
276
+ {
277
+ "name": "meta.format.dformat.pic",
278
+ "begin": "^style\\b",
279
+ "end": "$",
280
+ "beginCaptures": {
281
+ "0": {
282
+ "name": "keyword.function.pic"
283
+ }
284
+ },
285
+ "patterns": [
286
+ {
287
+ "include": "#boolean"
288
+ },
289
+ {
290
+ "name": "constant.language.dformat.pic",
291
+ "match": "(?x)\\b\n(addr|addrdelta|addrht|bitwid|charwid|fill|linedisp\n|linethrutext|recht|recspread|reset|textht)\\b"
292
+ },
293
+ {
294
+ "include": "#number"
295
+ }
296
+ ]
297
+ },
298
+ {
299
+ "name": "meta.record.dformat.pic",
300
+ "begin": "^\\S.*$\\n?",
301
+ "end": "^(?=\\S)",
302
+ "beginCaptures": {
303
+ "0": {
304
+ "name": "markup.bold.heading.dformat.pic"
305
+ }
306
+ },
307
+ "patterns": [
308
+ {
309
+ "match": "^([ \t]+[^:\\s]+:)?(?:(?<=:)|[ \t]+)(\\S+)\\s+(.*)$",
310
+ "captures": {
311
+ "0": {
312
+ "name": "markup.list.unnumbered.dformat.pic"
313
+ },
314
+ "1": {
315
+ "patterns": [
316
+ {
317
+ "include": "#main"
318
+ }
319
+ ]
320
+ },
321
+ "2": {
322
+ "patterns": [
323
+ {
324
+ "match": "-",
325
+ "name": "punctuation.separator.dash.dformat.pic"
326
+ },
327
+ {
328
+ "include": "#number"
329
+ }
330
+ ]
331
+ },
332
+ "3": {
333
+ "patterns": [
334
+ {
335
+ "begin": "@",
336
+ "end": "@",
337
+ "beginCaptures": {
338
+ "0": {
339
+ "name": "punctuation.definition.section.begin.eqn"
340
+ }
341
+ },
342
+ "endCaptures": {
343
+ "0": {
344
+ "name": "punctuation.definition.section.end.eqn"
345
+ }
346
+ },
347
+ "patterns": [
348
+ {
349
+ "include": "text.roff#eqn"
350
+ }
351
+ ],
352
+ "contentName": "source.embedded.eqn.roff"
353
+ }
354
+ ]
355
+ }
356
+ }
357
+ }
358
+ ]
359
+ }
360
+ ]
361
+ },
362
+ "escaped-newline": {
363
+ "name": "constant.character.escape.newline.pic",
364
+ "begin": "\\\\$\\n?",
365
+ "end": "^(?:[.'])?",
366
+ "beginCaptures": {
367
+ "0": {
368
+ "name": "punctuation.definition.escape.pic"
369
+ }
370
+ }
371
+ },
372
+ "function-call": {
373
+ "contentName": "meta.function-call.pic",
374
+ "begin": "\\b(?!\\d)(\\w+)(\\()",
375
+ "end": "\\)",
376
+ "patterns": [
377
+ {
378
+ "include": "#main"
379
+ }
380
+ ],
381
+ "beginCaptures": {
382
+ "0": {
383
+ "name": "support.function.pic"
384
+ },
385
+ "1": {
386
+ "name": "entity.name.function.pic"
387
+ },
388
+ "2": {
389
+ "name": "punctuation.definition.arguments.begin.pic"
390
+ }
391
+ },
392
+ "endCaptures": {
393
+ "0": {
394
+ "name": "punctuation.definition.arguments.end.pic"
395
+ }
396
+ }
397
+ },
398
+ "globals": {
399
+ "name": "support.variable.global.pic",
400
+ "match": "(?x)\\b (arcrad|arrowhead|arrowht|arrowwid|boxht|boxwid|circlerad|dashwid |ellipseht|ellipsewid|fillval|lineht|linewid|maxpsht|maxpswid |moveht|movewid|scale|textht|textwid)\\b"
401
+ },
402
+ "grap": {
403
+ "patterns": [
404
+ {
405
+ "match": "\\bpid\\b",
406
+ "name": "variable.language.process-id.pic.grap"
407
+ },
408
+ {
409
+ "match": "\\bthen\\b",
410
+ "name": "keyword.control.then.pic.grap"
411
+ },
412
+ {
413
+ "match": "\\b(in|out|through)\\b",
414
+ "name": "keyword.operator.pic.grap"
415
+ },
416
+ {
417
+ "include": "#comment"
418
+ },
419
+ {
420
+ "include": "#string"
421
+ },
422
+ {
423
+ "include": "#number"
424
+ },
425
+ {
426
+ "include": "#boolean"
427
+ },
428
+ {
429
+ "include": "#punctuation"
430
+ },
431
+ {
432
+ "include": "#operators"
433
+ },
434
+ {
435
+ "include": "#function-call"
436
+ },
437
+ {
438
+ "include": "#macros"
439
+ },
440
+ {
441
+ "include": "#pic-line"
442
+ },
443
+ {
444
+ "name": "keyword.function.pic.grap",
445
+ "match": "(?x)\\b\n(assignment|circle|coord|copy|draw|for|frame|graph|grid|if|label\n|line|new|next|numberlist|pic|plot|print|sh|ticks?)\\b",
446
+ "captures": {
447
+ "0": {
448
+ "name": "entity.function.name.pic.grap"
449
+ }
450
+ }
451
+ },
452
+ {
453
+ "name": "variable.other.property.$1.pic.grap",
454
+ "match": "(?x)\\b\n(above|arrow|below|bot|bottom|dashed|dotted|down|ht|invis\n|left|log|radius|right|[lr]just|size|solid|top|up|wid|x|y)\\b"
455
+ },
456
+ {
457
+ "name": "support.function.grap.pic",
458
+ "match": "(?x)\\b\n(atan2|cos|exp|int|log|max|min|rand|sin|sqrt|bullet\n|plus|box|star|dot|times|htick|vtick|square|delta)\\b"
459
+ },
460
+ {
461
+ "begin": "\\(",
462
+ "end": "(?=\\))|^(?=\\.P[EF]\\b|^[.']\\s*G2\\b)",
463
+ "patterns": [
464
+ {
465
+ "include": "#grap"
466
+ }
467
+ ],
468
+ "beginCaptures": {
469
+ "0": {
470
+ "name": "punctuation.definition.bracket.round.chem.pic"
471
+ }
472
+ }
473
+ },
474
+ {
475
+ "begin": "\\[",
476
+ "end": "(?=\\])|^(?=\\.P[EF]\\b|^[.']\\s*G2\\b)",
477
+ "patterns": [
478
+ {
479
+ "include": "#grap"
480
+ }
481
+ ],
482
+ "beginCaptures": {
483
+ "0": {
484
+ "name": "punctuation.definition.bracket.square.chem.pic"
485
+ }
486
+ }
487
+ },
488
+ {
489
+ "begin": "\\{",
490
+ "end": "(?=\\})|^(?=\\.P[EF]\\b|^[.']\\s*G2\\b)",
491
+ "patterns": [
492
+ {
493
+ "include": "#grap"
494
+ }
495
+ ],
496
+ "beginCaptures": {
497
+ "0": {
498
+ "name": "punctuation.definition.bracket.curly.chem.pic"
499
+ }
500
+ }
501
+ },
502
+ {
503
+ "include": "#keywords"
504
+ }
505
+ ]
506
+ },
507
+ "keywords": {
508
+ "patterns": [
509
+ {
510
+ "name": "keyword.control.$1.pic",
511
+ "match": "\\b(for|do|if|then(?=\\s*\\{)|else)\\b"
512
+ },
513
+ {
514
+ "name": "keyword.operator.$1.pic",
515
+ "match": "\\b(and|at|by|copy|from|reset|sh|then|thru|to|with|of\\s+the\\s+way\\s+between)\\b"
516
+ }
517
+ ]
518
+ },
519
+ "label": {
520
+ "match": "([A-Z][^#\\s:]*)(:)",
521
+ "captures": {
522
+ "1": {
523
+ "name": "storage.type.label.pic"
524
+ },
525
+ "2": {
526
+ "name": "punctuation.separator.key-value.pic"
527
+ }
528
+ }
529
+ },
530
+ "macros": {
531
+ "patterns": [
532
+ {
533
+ "name": "meta.function.$1.pic",
534
+ "match": "(define|undef)\\b\\s*(\\w*)",
535
+ "captures": {
536
+ "1": {
537
+ "name": "storage.type.function.pic"
538
+ },
539
+ "2": {
540
+ "name": "entity.name.function.pic"
541
+ }
542
+ }
543
+ },
544
+ {
545
+ "name": "variable.other.positional.pic",
546
+ "match": "(\\$)\\d+",
547
+ "captures": {
548
+ "1": {
549
+ "name": "punctuation.definition.variable"
550
+ }
551
+ }
552
+ },
553
+ {
554
+ "begin": "(until)[ \t]+((\")([^\"]+)(\"))\\s*$\\n?",
555
+ "end": "^[ ]*(\\4)\\b",
556
+ "patterns": [
557
+ {
558
+ "include": "$self"
559
+ }
560
+ ],
561
+ "beginCaptures": {
562
+ "1": {
563
+ "name": "keyword.control.until.pic"
564
+ },
565
+ "2": {
566
+ "name": "string.quoted.double.pic"
567
+ },
568
+ "3": {
569
+ "name": "punctuation.definition.string.begin.pic"
570
+ },
571
+ "5": {
572
+ "name": "punctuation.definition.string.end.pic"
573
+ }
574
+ },
575
+ "endCaptures": {
576
+ "1": {
577
+ "name": "keyword.control.terminator.pic"
578
+ }
579
+ }
580
+ }
581
+ ]
582
+ },
583
+ "name": {
584
+ "name": "variable.other.pic",
585
+ "match": "(?!\\d)\\w+"
586
+ },
587
+ "number": {
588
+ "name": "constant.numeric.pic",
589
+ "match": "(?:(?<!\\d)[-+])?(?:\\d+(?:\\.\\d+)?|\\.\\d+|\\.(?=[Ee]))(?:[Ee][-+]?\\d+)?"
590
+ },
591
+ "operators": {
592
+ "patterns": [
593
+ {
594
+ "match": "[=><]=?|!=|&&|\\|\\|",
595
+ "name": "keyword.operator.comparison.pic"
596
+ },
597
+ {
598
+ "match": ":?=",
599
+ "name": "keyword.operator.assignment.pic"
600
+ },
601
+ {
602
+ "match": "<-|<->|->",
603
+ "name": "keyword.operator.arrow.pic"
604
+ },
605
+ {
606
+ "match": "[-/+*%^]",
607
+ "name": "keyword.operator.arithmetic.pic"
608
+ }
609
+ ]
610
+ },
611
+ "primitives": {
612
+ "name": "keyword.function.pic",
613
+ "match": "\\b(box|line|arrow|circle|ellipse|arc|move|spline|print|command|plot)\\b",
614
+ "captures": {
615
+ "0": {
616
+ "name": "entity.function.name.pic"
617
+ }
618
+ }
619
+ },
620
+ "pic-line": {
621
+ "begin": "^(pic)\\b",
622
+ "end": "$",
623
+ "beginCaptures": {
624
+ "1": {
625
+ "name": "keyword.control.dformat.pic"
626
+ }
627
+ },
628
+ "patterns": [
629
+ {
630
+ "include": "#main"
631
+ }
632
+ ]
633
+ },
634
+ "punctuation": {
635
+ "patterns": [
636
+ {
637
+ "match": "\\}",
638
+ "name": "punctuation.definition.bracket.curly.pic"
639
+ },
640
+ {
641
+ "match": "\\)",
642
+ "name": "punctuation.definition.bracket.round.pic"
643
+ },
644
+ {
645
+ "match": "\\]",
646
+ "name": "punctuation.definition.bracket.square.pic"
647
+ },
648
+ {
649
+ "match": ";",
650
+ "name": "punctuation.terminator.statement.pic"
651
+ },
652
+ {
653
+ "match": ",",
654
+ "name": "punctuation.separator.comma.pic"
655
+ },
656
+ {
657
+ "match": "<|>",
658
+ "name": "punctuation.definition.bracket.angle.pic"
659
+ },
660
+ {
661
+ "match": "\\.(?!\\d)",
662
+ "name": "punctuation.delimiter.period.full-stop.pic"
663
+ }
664
+ ]
665
+ },
666
+ "string": {
667
+ "name": "string.quoted.double.pic",
668
+ "begin": "\"",
669
+ "end": "\"",
670
+ "beginCaptures": {
671
+ "0": {
672
+ "name": "punctuation.definition.string.begin.pic"
673
+ }
674
+ },
675
+ "endCaptures": {
676
+ "0": {
677
+ "name": "punctuation.definition.string.end.pic"
678
+ }
679
+ },
680
+ "patterns": [
681
+ {
682
+ "include": "text.roff#escapes"
683
+ }
684
+ ]
685
+ },
686
+ "tags": {
687
+ "patterns": [
688
+ {
689
+ "name": "invalid.deprecated.function.picture.macro.roff",
690
+ "match": "^([.'])[ \t]*(PS)[ \t]*(<)(.*)(?=$|\\\\\")",
691
+ "captures": {
692
+ "1": {
693
+ "name": "punctuation.definition.macro.roff"
694
+ },
695
+ "2": {
696
+ "name": "entity.function.name.roff"
697
+ },
698
+ "3": {
699
+ "name": "punctuation.definition.filename.roff"
700
+ },
701
+ "4": {
702
+ "patterns": [
703
+ {
704
+ "include": "text.roff#params"
705
+ }
706
+ ]
707
+ }
708
+ }
709
+ },
710
+ {
711
+ "begin": "^([.'])[ \t]*(PS)\\b([\\d \t]*(?:#.*)?)?(\\\\[#\"].*)?$",
712
+ "end": "^([.'])[ \t]*(P[EF])\\b",
713
+ "contentName": "source.embedded.pic",
714
+ "patterns": [
715
+ {
716
+ "include": "$self"
717
+ }
718
+ ],
719
+ "beginCaptures": {
720
+ "0": {
721
+ "name": "meta.function.begin.picture.section.macro.roff"
722
+ },
723
+ "1": {
724
+ "name": "punctuation.definition.macro.roff"
725
+ },
726
+ "2": {
727
+ "name": "entity.function.name.roff"
728
+ },
729
+ "3": {
730
+ "patterns": [
731
+ {
732
+ "include": "source.pic"
733
+ }
734
+ ]
735
+ },
736
+ "4": {
737
+ "patterns": [
738
+ {
739
+ "include": "text.roff#escapes"
740
+ }
741
+ ]
742
+ }
743
+ },
744
+ "endCaptures": {
745
+ "0": {
746
+ "name": "meta.function.end.picture.section.macro.roff"
747
+ },
748
+ "1": {
749
+ "name": "punctuation.definition.macro.roff"
750
+ },
751
+ "2": {
752
+ "name": "entity.name.function.roff"
753
+ }
754
+ }
755
+ },
756
+ {
757
+ "begin": "^([.'])[ \t]*(cstart)\\b\\s*(\\S.*)?",
758
+ "end": "^([.'])[ \t]*(cend)\\b",
759
+ "contentName": "source.embedded.chem.pic",
760
+ "patterns": [
761
+ {
762
+ "include": "#chem"
763
+ }
764
+ ],
765
+ "beginCaptures": {
766
+ "0": {
767
+ "name": "meta.function.begin.chemical.picture.section.macro.roff"
768
+ },
769
+ "1": {
770
+ "name": "punctuation.definition.macro.pic.chem"
771
+ },
772
+ "2": {
773
+ "name": "entity.function.name.roff"
774
+ },
775
+ "3": {
776
+ "name": "invalid.illegal.unexpected-characters.pic.chem"
777
+ }
778
+ },
779
+ "endCaptures": {
780
+ "0": {
781
+ "name": "meta.function.end.chemical.picture.section.macro.roff"
782
+ },
783
+ "1": {
784
+ "name": "punctuation.definition.macro.roff"
785
+ },
786
+ "2": {
787
+ "name": "entity.function.name.roff"
788
+ }
789
+ }
790
+ },
791
+ {
792
+ "begin": "^([.'])[ \t]*(begin[ \t]+dformat)\\b",
793
+ "end": "^([.'])[ \t]*(end)\\b",
794
+ "contentName": "source.embedded.dformat.pic",
795
+ "patterns": [
796
+ {
797
+ "include": "#dformat"
798
+ }
799
+ ],
800
+ "beginCaptures": {
801
+ "0": {
802
+ "name": "meta.function.begin.dformat.picture.section.macro.roff"
803
+ },
804
+ "1": {
805
+ "name": "punctuation.definition.macro.pic.dformat"
806
+ },
807
+ "2": {
808
+ "name": "entity.function.name.roff"
809
+ }
810
+ },
811
+ "endCaptures": {
812
+ "0": {
813
+ "name": "meta.function.end.dformat.picture.section.macro.roff"
814
+ },
815
+ "1": {
816
+ "name": "punctuation.definition.macro.roff"
817
+ },
818
+ "2": {
819
+ "name": "entity.function.name.roff"
820
+ }
821
+ }
822
+ },
823
+ {
824
+ "begin": "^([.'])[ \t]*(G1)\\b(\\s*\\d+)?(\\s*\\\\\".*$)?",
825
+ "end": "^([.'])[ \t]*(G2)\\b",
826
+ "contentName": "source.embedded.grap.pic",
827
+ "patterns": [
828
+ {
829
+ "include": "#grap"
830
+ }
831
+ ],
832
+ "beginCaptures": {
833
+ "0": {
834
+ "name": "meta.function.begin.graph.picture.section.macro.roff"
835
+ },
836
+ "1": {
837
+ "name": "punctuation.definition.macro.pic.grap"
838
+ },
839
+ "2": {
840
+ "name": "entity.function.name.roff"
841
+ },
842
+ "3": {
843
+ "name": "constant.numeric.parameter.pic.grap"
844
+ },
845
+ "4": {
846
+ "patterns": [
847
+ {
848
+ "include": "text.roff#escapes"
849
+ }
850
+ ]
851
+ }
852
+ },
853
+ "endCaptures": {
854
+ "0": {
855
+ "name": "meta.function.end.graph.picture.section.macro.roff"
856
+ },
857
+ "1": {
858
+ "name": "punctuation.definition.macro.pic.grap"
859
+ },
860
+ "2": {
861
+ "name": "entity.function.name.roff"
862
+ }
863
+ }
864
+ }
865
+ ]
866
+ }
867
+ }
868
+ }