github-linguist 5.0.10 → 5.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/source.batchfile.json +577 -76
- data/grammars/source.clojure.json +5 -18
- data/grammars/source.crystal.json +1 -1
- data/grammars/source.csound-document.json +80 -20
- data/grammars/source.css.json +1 -1
- data/grammars/source.css.less.json +5 -10
- data/grammars/source.d.json +4 -0
- data/grammars/source.dart.json +128 -478
- data/grammars/source.gfm.json +107 -86
- data/grammars/source.graphql.json +1 -0
- data/grammars/source.harbour.json +28 -16
- data/grammars/source.jison.json +5 -2
- data/grammars/source.jisonlex-injection.json +1 -1
- data/grammars/source.js.json +1 -1
- data/grammars/source.lua.json +117 -29
- data/grammars/source.modelica.json +4 -0
- data/grammars/source.nim.json +1 -1
- data/grammars/source.pep8.json +122 -0
- data/grammars/source.perl6fe.json +3 -3
- data/grammars/source.php.zephir.json +6 -6
- data/grammars/source.rust.json +60 -52
- data/grammars/source.shen.json +162 -0
- data/grammars/source.sqf.json +1 -1
- data/grammars/source.terraform.json +1 -1
- data/grammars/source.tla.json +1 -1
- data/grammars/source.yaml-ext.json +330 -0
- data/grammars/text.haml.json +42 -12
- data/grammars/text.html.basic.json +43 -1
- data/grammars/text.html.php.blade.json +10 -6
- data/grammars/text.html.php.json +18 -14
- data/grammars/text.html.soy.json +609 -0
- data/lib/linguist/generated.rb +4 -4
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +32 -4
- data/lib/linguist/samples.json +1336 -90
- data/lib/linguist/version.rb +1 -1
- metadata +6 -5
- data/grammars/source.pubspec.json +0 -13
- data/grammars/text.dart-analysis-output.json +0 -162
- data/grammars/text.dart-doccomments.json +0 -19
@@ -45,6 +45,11 @@
|
|
45
45
|
"name": "comment.line.double-slash.harbour",
|
46
46
|
"match": "//.*$"
|
47
47
|
},
|
48
|
+
"line_Ampersand_comment": {
|
49
|
+
"comment": "Single-line comment",
|
50
|
+
"name": "comment.line.double-slash.harbour",
|
51
|
+
"match": "&&.*$"
|
52
|
+
},
|
48
53
|
"line_asterisk_comment": {
|
49
54
|
"comment": "Single-line comment",
|
50
55
|
"name": "comment.line.star.harbour",
|
@@ -53,7 +58,7 @@
|
|
53
58
|
"line_note_comment": {
|
54
59
|
"comment": "Single-line note comment",
|
55
60
|
"name": "comment.line.note.harbour",
|
56
|
-
"match": "NOTE\\s.*$"
|
61
|
+
"match": "^\\s*NOTE\\s.*$"
|
57
62
|
},
|
58
63
|
"escaped_character": {
|
59
64
|
"name": "constant.character.escape.harbour",
|
@@ -68,10 +73,7 @@
|
|
68
73
|
"comment": "Double-quote string",
|
69
74
|
"name": "string.quoted.double.harbour",
|
70
75
|
"begin": "\"",
|
71
|
-
"end": "\""
|
72
|
-
"patterns": [
|
73
|
-
|
74
|
-
]
|
76
|
+
"end": "\""
|
75
77
|
},
|
76
78
|
"std_types": {
|
77
79
|
"comment": "Standard library type",
|
@@ -102,6 +104,9 @@
|
|
102
104
|
{
|
103
105
|
"include": "#line_comment"
|
104
106
|
},
|
107
|
+
{
|
108
|
+
"include": "#line_Ampersand_comment"
|
109
|
+
},
|
105
110
|
{
|
106
111
|
"include": "#line_asterisk_comment"
|
107
112
|
},
|
@@ -123,9 +128,16 @@
|
|
123
128
|
]
|
124
129
|
},
|
125
130
|
{
|
126
|
-
"comment": "Single-quote string
|
131
|
+
"comment": "Single-quote string",
|
127
132
|
"name": "string.quoted.single.harbour",
|
128
|
-
"
|
133
|
+
"begin": "'",
|
134
|
+
"end": "'"
|
135
|
+
},
|
136
|
+
{
|
137
|
+
"comment": "square bracket string",
|
138
|
+
"name": "string.quoted.square.harbour",
|
139
|
+
"begin": "(?<=\\s|,|\\(|=)\\[",
|
140
|
+
"end": "\\]"
|
129
141
|
},
|
130
142
|
{
|
131
143
|
"include": "#string_literal"
|
@@ -193,22 +205,22 @@
|
|
193
205
|
{
|
194
206
|
"comment": "Control keyword",
|
195
207
|
"name": "keyword.control.harbour",
|
196
|
-
"match": "\\b(EXIT|ELSEIF|ELSE|IF|ENDIF|FOR|EACH|IN|TO|STEP|DESCEND|NEXT|LOOP|DO CASE|ENDCASE|SWITCH|CASE|OTHERWISE|ENDSWITCH|RETURN|ENDCLASS|VAR|DATA|INIT|WHILE|DO WHILE|ENDDO|BEGIN SEQUENCE|END SEQUENCE|RECOVER USING|WITH|BREAK|PARAMETERS|END|REQUEST|ANNOUNCE)\\b"
|
208
|
+
"match": "\\b(?i)(EXIT|ELSEIF|ELSE|IF|ENDIF|FOR|EACH|IN|TO|STEP|DESCEND|NEXT|LOOP|DO CASE|ENDCASE|SWITCH|CASE|OTHERWISE|ENDSWITCH|RETURN|ENDCLASS|VAR|DATA|INIT|WHILE|DO WHILE|ENDDO|BEGIN SEQUENCE|END SEQUENCE|RECOVER USING|WITH|BREAK|PARAMETERS|END|REQUEST|ANNOUNCE)\\b"
|
197
209
|
},
|
198
210
|
{
|
199
211
|
"comment": "xBase keywords",
|
200
212
|
"name": "keyword.command.xbase.harbour",
|
201
|
-
"match": "\\b(GO TOP|SELECT|SAY|GET|PICTURE|SEEK|REPLACE|APPEND BLANK|USE|INDEX ON|TAG)\\b"
|
213
|
+
"match": "\\b(?i)(GO TOP|SELECT|SAY|GET|PICTURE|SEEK|REPLACE|APPEND BLANK|USE|INDEX ON|TAG)\\b"
|
202
214
|
},
|
203
215
|
{
|
204
216
|
"comment": "xBase keywords",
|
205
217
|
"name": "keyword.command.xbase.harbour",
|
206
|
-
"match": "\\b(HSEEK|RREPLACE|START PRINT|ENDPRINT)\\b"
|
218
|
+
"match": "\\b(?i)(HSEEK|RREPLACE|START PRINT|ENDPRINT)\\b"
|
207
219
|
},
|
208
220
|
{
|
209
221
|
"comment": "Keyword",
|
210
222
|
"name": "keyword.other.harbour",
|
211
|
-
"match": "\\b(LOCAL|PRIVATE|PROTECTED|PUBLIC|FIELD|field|MEMVAR)\\b"
|
223
|
+
"match": "\\b(?i)(LOCAL|PRIVATE|PROTECTED|PUBLIC|FIELD|field|MEMVAR)\\b"
|
212
224
|
},
|
213
225
|
{
|
214
226
|
"include": "#types"
|
@@ -276,7 +288,7 @@
|
|
276
288
|
]
|
277
289
|
},
|
278
290
|
{
|
279
|
-
"begin": "^\\s*#\\s*(define|defined|elif|else|if|ifdef|ifndef|endif|line|pragma|undef|command|xcommand|translate|xtranslate)\\b",
|
291
|
+
"begin": "(?i)^\\s*#\\s*(define|defined|elif|else|if|ifdef|ifndef|endif|line|pragma|undef|command|xcommand|translate|xtranslate)\\b",
|
280
292
|
"captures": {
|
281
293
|
"1": {
|
282
294
|
"name": "keyword.control.import.harbour"
|
@@ -302,7 +314,7 @@
|
|
302
314
|
{
|
303
315
|
"comment": "Standard library macro",
|
304
316
|
"name": "support.function.std.harbour",
|
305
|
-
"match": "\\b(log_write|pp|to_str|RTrim|TRIM|Trim|PadR|Padr|PADR|PadC|PadL|Space)!"
|
317
|
+
"match": "\\b(?i)(log_write|pp|to_str|RTrim|TRIM|Trim|PadR|Padr|PADR|PadC|PadL|Space)!"
|
306
318
|
},
|
307
319
|
{
|
308
320
|
"comment": "Function call",
|
@@ -336,7 +348,7 @@
|
|
336
348
|
},
|
337
349
|
{
|
338
350
|
"comment": "Function definition",
|
339
|
-
"begin": "\\b(
|
351
|
+
"begin": "\\b(?i)((?:(?:static|init|exit)\\s+)?(?:func(?:t(?:i(?:o(?:n)?)?)?)?|PROC(?:E(?:D(?:U(?:R(?:E)?)?)?)?)?))\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
|
340
352
|
"end": "[\\n]",
|
341
353
|
"beginCaptures": {
|
342
354
|
"1": {
|
@@ -357,7 +369,7 @@
|
|
357
369
|
},
|
358
370
|
{
|
359
371
|
"comment": "CLASS definition",
|
360
|
-
"begin": "\\b((?:CREATE\\s+)?(?:CLASS))\\s+([a-zA-Z_][a-zA-Z0-9_]*)(?:\\s+(INHERIT)\\s+([a-zA-Z_][a-zA-Z0-9_]*))?",
|
372
|
+
"begin": "\\b(?i)((?:CREATE\\s+)?(?:CLASS))\\s+([a-zA-Z_][a-zA-Z0-9_]*)(?:\\s+(INHERIT)\\s+([a-zA-Z_][a-zA-Z0-9_]*))?",
|
361
373
|
"end": "[\\n]",
|
362
374
|
"beginCaptures": {
|
363
375
|
"1": {
|
@@ -384,7 +396,7 @@
|
|
384
396
|
},
|
385
397
|
{
|
386
398
|
"comment": "Method definition",
|
387
|
-
"begin": "\\b(METHOD|STATIC METHOD|METHOD PROCEDURE)\\s+((?:(?:[a-zA-Z_][a-zA-Z0-9_]*):)?(?:[a-zA-Z_][a-zA-Z0-9_]*))",
|
399
|
+
"begin": "\\b(?i)(METHOD|STATIC METHOD|METHOD PROCEDURE)\\s+((?:(?:[a-zA-Z_][a-zA-Z0-9_]*):)?(?:[a-zA-Z_][a-zA-Z0-9_]*))",
|
388
400
|
"end": "[\\n]",
|
389
401
|
"beginCaptures": {
|
390
402
|
"1": {
|
data/grammars/source.jison.json
CHANGED
@@ -409,7 +409,7 @@
|
|
409
409
|
},
|
410
410
|
{
|
411
411
|
"name": "meta.action.jison",
|
412
|
-
"begin": "
|
412
|
+
"begin": "(?:->|→)",
|
413
413
|
"end": "((//).*)?(?=$)",
|
414
414
|
"beginCaptures": {
|
415
415
|
"0": {
|
@@ -547,6 +547,9 @@
|
|
547
547
|
}
|
548
548
|
},
|
549
549
|
"patterns": [
|
550
|
+
{
|
551
|
+
"include": "#comments"
|
552
|
+
},
|
550
553
|
{
|
551
554
|
"name": "entity.name.constant.jison",
|
552
555
|
"match": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b"
|
@@ -626,7 +629,7 @@
|
|
626
629
|
}
|
627
630
|
},
|
628
631
|
"injections": {
|
629
|
-
"L:meta.action.jison -(comment | string), source.js.embedded.source": {
|
632
|
+
"L:(meta.action.jison - (comment | string)), source.js.embedded.source": {
|
630
633
|
"patterns": [
|
631
634
|
{
|
632
635
|
"name": "variable.language.semantic-value.jison",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "Jison Lex Injection",
|
3
3
|
"scopeName": "source.jisonlex-injection",
|
4
|
-
"injectionSelector": "L:meta.rule.action.jisonlex -comment",
|
4
|
+
"injectionSelector": "L:(meta.rule.action.jisonlex - comment)",
|
5
5
|
"patterns": [
|
6
6
|
{
|
7
7
|
"name": "variable.language.jisonlex",
|
data/grammars/source.js.json
CHANGED
@@ -1598,7 +1598,7 @@
|
|
1598
1598
|
"name": "support.function.event-handler.js"
|
1599
1599
|
},
|
1600
1600
|
{
|
1601
|
-
"match": "(?x)\n\\b(shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\nscrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\nsup|sub|substr|substring|splice|split|send|set(Milliseconds|Seconds|Minutes|Hours|\nMonth|Year|FullYear|Date|UTC(Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\nTime|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\nsavePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\ncontextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\ncreateEventObject|to(GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\ntest|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\nuntaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\nprint|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\nfileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\nforward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\nabort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\nreleaseCapture|releaseEvents|go|get(Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\nTime|Date|TimezoneOffset|UTC(Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\nAttention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\nmoveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back)\\b",
|
1601
|
+
"match": "(?x)\n\\b(shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\nscrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\nsup|sub|substr|substring|splice|split|send|set(Milliseconds|Seconds|Minutes|Hours|\nMonth|Year|FullYear|Date|UTC(Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\nTime|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\nsavePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\ncontextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\ncreateEventObject|to(GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\ntest|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\nuntaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|stringify|\nprint|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\nfileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\nforward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\nabort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\nreleaseCapture|releaseEvents|go|get(Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\nTime|Date|TimezoneOffset|UTC(Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\nAttention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\nmoveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back)\\b",
|
1602
1602
|
"name": "support.function.js"
|
1603
1603
|
},
|
1604
1604
|
{
|
data/grammars/source.lua.json
CHANGED
@@ -1,39 +1,61 @@
|
|
1
1
|
{
|
2
2
|
"comment": "Lua Syntax: version 0.8",
|
3
3
|
"fileTypes": [
|
4
|
-
"lua"
|
4
|
+
"lua",
|
5
|
+
"p8",
|
6
|
+
"rockspec",
|
7
|
+
"luacheckrc",
|
8
|
+
"lakefile"
|
5
9
|
],
|
6
|
-
"firstLineMatch": "\\A#!.*?\\blua\\b",
|
10
|
+
"firstLineMatch": "\\A#!.*?\\blua(\\d+(\\.\\d+)?)?\\b|\\A--\\s+-\\*-\\s*lua\\s*-\\*-",
|
7
11
|
"keyEquivalent": "^~L",
|
8
12
|
"name": "Lua",
|
9
13
|
"patterns": [
|
10
14
|
{
|
11
|
-
"
|
15
|
+
"begin": "\\b((local\\b)\\s+)?(function)\\s*(\\s+[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*(:[a-zA-Z_][a-zA-Z0-9_]*)?\\s*)?(\\()",
|
16
|
+
"beginCaptures": {
|
12
17
|
"1": {
|
13
|
-
"name": "
|
14
|
-
},
|
15
|
-
"2": {
|
16
|
-
"name": "entity.name.function.scope.lua"
|
18
|
+
"name": "storage.modifier.local.lua"
|
17
19
|
},
|
18
20
|
"3": {
|
19
|
-
"name": "
|
21
|
+
"name": "keyword.control.lua"
|
20
22
|
},
|
21
23
|
"4": {
|
22
|
-
"name": "
|
24
|
+
"name": "entity.name.function.lua"
|
23
25
|
},
|
24
26
|
"5": {
|
25
|
-
"name": "
|
26
|
-
}
|
27
|
-
|
27
|
+
"name": "punctuation.definition.parameters.begin.lua"
|
28
|
+
}
|
29
|
+
},
|
30
|
+
"end": "\\)",
|
31
|
+
"endCaptures": {
|
32
|
+
"0": {
|
28
33
|
"name": "punctuation.definition.parameters.end.lua"
|
29
34
|
}
|
30
35
|
},
|
31
|
-
"
|
32
|
-
"
|
36
|
+
"name": "meta.function.lua",
|
37
|
+
"patterns": [
|
38
|
+
{
|
39
|
+
"match": "[a-zA-Z_][a-zA-Z0-9_]*",
|
40
|
+
"name": "variable.parameter.function.lua"
|
41
|
+
}
|
42
|
+
]
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"match": "(?<![\\w\\d.])0[xX]\\h+(?![pPeE.0-9])",
|
46
|
+
"name": "constant.numeric.integer.hexadecimal.lua"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"match": "(?<![\\w\\d.])0[xX]\\h+(\\.\\h+)?([eE]-?\\d*)?([pP][-+]\\d+)?",
|
50
|
+
"name": "constant.numeric.float.hexadecimal.lua"
|
33
51
|
},
|
34
52
|
{
|
35
|
-
"match": "(?<![\\d.])\\
|
36
|
-
"name": "constant.numeric.lua"
|
53
|
+
"match": "(?<![\\w\\d.])\\d+(?![pPeE.0-9])",
|
54
|
+
"name": "constant.numeric.integer.lua"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"match": "(?<![\\w\\d.])\\d+(\\.\\d+)?([eE]-?\\d*)?",
|
58
|
+
"name": "constant.numeric.float.lua"
|
37
59
|
},
|
38
60
|
{
|
39
61
|
"begin": "'",
|
@@ -51,8 +73,7 @@
|
|
51
73
|
"name": "string.quoted.single.lua",
|
52
74
|
"patterns": [
|
53
75
|
{
|
54
|
-
"
|
55
|
-
"name": "constant.character.escape.lua"
|
76
|
+
"include": "#escaped_char"
|
56
77
|
}
|
57
78
|
]
|
58
79
|
},
|
@@ -72,8 +93,7 @@
|
|
72
93
|
"name": "string.quoted.double.lua",
|
73
94
|
"patterns": [
|
74
95
|
{
|
75
|
-
"
|
76
|
-
"name": "constant.character.escape.lua"
|
96
|
+
"include": "#escaped_char"
|
77
97
|
}
|
78
98
|
]
|
79
99
|
},
|
@@ -119,24 +139,43 @@
|
|
119
139
|
"name": "string.quoted.other.multiline.lua"
|
120
140
|
},
|
121
141
|
{
|
122
|
-
"begin": "--\\[(=*)\\[",
|
123
142
|
"captures": {
|
124
|
-
"
|
143
|
+
"1": {
|
125
144
|
"name": "punctuation.definition.comment.lua"
|
126
145
|
}
|
127
146
|
},
|
128
|
-
"
|
129
|
-
"name": "comment.
|
147
|
+
"match": "\\A(#!).*$\\n?",
|
148
|
+
"name": "comment.line.shebang.lua"
|
130
149
|
},
|
131
150
|
{
|
132
|
-
"begin": "(^[ \\t]+)?(?=--
|
151
|
+
"begin": "(^[ \\t]+)?(?=--)",
|
133
152
|
"beginCaptures": {
|
134
153
|
"1": {
|
135
154
|
"name": "punctuation.whitespace.comment.leading.lua"
|
136
155
|
}
|
137
156
|
},
|
138
|
-
"end": "(?!\\G)",
|
157
|
+
"end": "(?!\\G)((?!^)[ \\t]+\\n)?",
|
158
|
+
"endCaptures": {
|
159
|
+
"1": {
|
160
|
+
"name": "punctuation.whitespace.comment.trailing.lua"
|
161
|
+
}
|
162
|
+
},
|
139
163
|
"patterns": [
|
164
|
+
{
|
165
|
+
"begin": "--\\[(=*)\\[",
|
166
|
+
"beginCaptures": {
|
167
|
+
"0": {
|
168
|
+
"name": "punctuation.definition.comment.begin.lua"
|
169
|
+
}
|
170
|
+
},
|
171
|
+
"end": "\\]\\1\\]",
|
172
|
+
"endCaptures": {
|
173
|
+
"0": {
|
174
|
+
"name": "punctuation.definition.comment.end.lua"
|
175
|
+
}
|
176
|
+
},
|
177
|
+
"name": "comment.block.lua"
|
178
|
+
},
|
140
179
|
{
|
141
180
|
"begin": "--",
|
142
181
|
"beginCaptures": {
|
@@ -150,7 +189,30 @@
|
|
150
189
|
]
|
151
190
|
},
|
152
191
|
{
|
153
|
-
"
|
192
|
+
"captures": {
|
193
|
+
"1": {
|
194
|
+
"name": "keyword.control.goto.lua"
|
195
|
+
},
|
196
|
+
"2": {
|
197
|
+
"name": "constant.other.placeholder.lua"
|
198
|
+
}
|
199
|
+
},
|
200
|
+
"match": "\\b(goto)\\s+([a-zA-Z_][a-zA-Z0-9_]*)"
|
201
|
+
},
|
202
|
+
{
|
203
|
+
"captures": {
|
204
|
+
"1": {
|
205
|
+
"name": "punctuation.definition.label.begin.lua"
|
206
|
+
},
|
207
|
+
"2": {
|
208
|
+
"name": "punctuation.definition.label.end.lua"
|
209
|
+
}
|
210
|
+
},
|
211
|
+
"match": "(::)[a-zA-Z_][a-zA-Z0-9_]*(::)",
|
212
|
+
"name": "constant.other.placeholder.lua"
|
213
|
+
},
|
214
|
+
{
|
215
|
+
"match": "\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|function|local|in)\\b",
|
154
216
|
"name": "keyword.control.lua"
|
155
217
|
},
|
156
218
|
{
|
@@ -174,11 +236,11 @@
|
|
174
236
|
"name": "keyword.operator.lua"
|
175
237
|
},
|
176
238
|
{
|
177
|
-
"match": "\\b([
|
239
|
+
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(?:[({\"']|\\[\\[))",
|
178
240
|
"name": "support.function.any-method.lua"
|
179
241
|
},
|
180
242
|
{
|
181
|
-
"match": "(?<=[^.]\\.|:)\\b([
|
243
|
+
"match": "(?<=[^.]\\.|:)\\b([a-zA-Z_][a-zA-Z0-9_]*)",
|
182
244
|
"name": "variable.other.lua"
|
183
245
|
},
|
184
246
|
{
|
@@ -186,6 +248,32 @@
|
|
186
248
|
"name": "keyword.operator.lua"
|
187
249
|
}
|
188
250
|
],
|
251
|
+
"repository": {
|
252
|
+
"escaped_char": {
|
253
|
+
"patterns": [
|
254
|
+
{
|
255
|
+
"match": "\\\\[abfnrtvz\\\\\"'\\n]",
|
256
|
+
"name": "constant.character.escape.lua"
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"match": "\\\\\\d{1,3}",
|
260
|
+
"name": "constant.character.escape.byte.lua"
|
261
|
+
},
|
262
|
+
{
|
263
|
+
"match": "\\\\x\\h\\h",
|
264
|
+
"name": "constant.character.escape.byte.lua"
|
265
|
+
},
|
266
|
+
{
|
267
|
+
"match": "\\\\u\\{\\h+\\}",
|
268
|
+
"name": "constant.character.escape.unicode.lua"
|
269
|
+
},
|
270
|
+
{
|
271
|
+
"match": "\\\\.",
|
272
|
+
"name": "invalid.illegal.character.escape.lua"
|
273
|
+
}
|
274
|
+
]
|
275
|
+
}
|
276
|
+
},
|
189
277
|
"scopeName": "source.lua",
|
190
278
|
"uuid": "93E017CC-6F27-11D9-90EB-000D93589AF7"
|
191
279
|
}
|
@@ -57,6 +57,10 @@
|
|
57
57
|
"match": "\\b(algorithm|equation|initial equation|protected|public|register|end)\\b",
|
58
58
|
"name": "keyword"
|
59
59
|
},
|
60
|
+
{
|
61
|
+
"match": "\\b(inner|outer)\\b",
|
62
|
+
"name": "keyword.other"
|
63
|
+
},
|
60
64
|
{
|
61
65
|
"match": "\\b(acos|asin|atan|atan2|cos|cosh|exp|log|log10|sin|sinh|tan|tanh|abs|sign|sqrt|max|min|product|sum)\\b",
|
62
66
|
"name": "support.function.mathematical"
|
data/grammars/source.nim.json
CHANGED
@@ -0,0 +1,122 @@
|
|
1
|
+
{
|
2
|
+
"fileTypes": [
|
3
|
+
"pep"
|
4
|
+
],
|
5
|
+
"name": "Pep8",
|
6
|
+
"patterns": [
|
7
|
+
{
|
8
|
+
"include": "#strings"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"include": "#comment-single-line"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"include": "#variable"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"include": "#constant"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"include": "#storage"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"include": "#keyword"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"include": "#entity"
|
27
|
+
}
|
28
|
+
],
|
29
|
+
"repository": {
|
30
|
+
"character": {
|
31
|
+
"match": "('[^\\\\']'|'\\\\.')",
|
32
|
+
"name": "string.character.pep8"
|
33
|
+
},
|
34
|
+
"comment-single-line": {
|
35
|
+
"match": ";.*",
|
36
|
+
"name": "comment.singleline.pep8"
|
37
|
+
},
|
38
|
+
"comments": {
|
39
|
+
"patterns": [
|
40
|
+
{
|
41
|
+
"include": "#comment-single-line"
|
42
|
+
}
|
43
|
+
]
|
44
|
+
},
|
45
|
+
"constant": {
|
46
|
+
"patterns": [
|
47
|
+
{
|
48
|
+
"match": "-?0(x|X)[0-9A-Fa-f]+",
|
49
|
+
"name": "constant.numeric.hex.pep8"
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"match": "-?([0-9]+)",
|
53
|
+
"name": "constant.numeric.int.pep8"
|
54
|
+
}
|
55
|
+
]
|
56
|
+
},
|
57
|
+
"entity": {
|
58
|
+
"patterns": [
|
59
|
+
{
|
60
|
+
"match": ", *(i|d|x|n|(sx?f?))",
|
61
|
+
"name": "entity.other.attribute-name.pep8"
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"match": "( |\\t)*",
|
65
|
+
"name": "entity.whitespaces.pep8"
|
66
|
+
}
|
67
|
+
]
|
68
|
+
},
|
69
|
+
"keyword": {
|
70
|
+
"patterns": [
|
71
|
+
{
|
72
|
+
"match": "([cC][aA][lL][lL])|([sS][tT][oO][pP])|([bB][rR]((([lL]|[gG])([tT]|[eE]))|([eE][qQ])|([nN][eE])|[vV]|[cC])?)|([rR][eE][tT]([0-7]|([tT][rR])))\\b",
|
73
|
+
"name": "keyword.control.pep8"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"match": "(([aA][dD][dD])|([sS][uU][bB])|([nN][oO][tT])|([nN][eE][gG])|([aA][sS]([lL]|[rR]))|([rR][oO]([lL]|[rR]))|([oO][rR])|([cC][pP]))([aA]|[xX])\\b",
|
77
|
+
"name": "keyword.operator.pep8"
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"match": "([mM][oO][vV]([sS][pP]|[fF][lL][gG])[aA])|([nN][oO][pP][0-3]?)|((([aA][dD][dD])|([sS][uU][bB]))[sS][pP])|([dD][eE][cC]([iI]|[oO]))|((([lL][dD])|([sS][tT]))([bB][yY][tT][eE])?([aA]|[xX]))|([cC][hH][aA][rR]([iI]|[oO]))|([sS][tT][rR][oO])\\b",
|
81
|
+
"name": "keyword.misc.pep8"
|
82
|
+
}
|
83
|
+
]
|
84
|
+
},
|
85
|
+
"simple-string": {
|
86
|
+
"begin": "\\\"",
|
87
|
+
"end": "\\\"",
|
88
|
+
"name": "string.quoted.double.pep8",
|
89
|
+
"patterns": [
|
90
|
+
{
|
91
|
+
"match": "([^\\\\]|\\\\.)",
|
92
|
+
"name": "string.char.pep8"
|
93
|
+
}
|
94
|
+
]
|
95
|
+
},
|
96
|
+
"storage": {
|
97
|
+
"patterns": [
|
98
|
+
{
|
99
|
+
"match": "[.](([bB][uU][rR][nN])|([eE][qQ][uU][aA][tT][eE])|([bB][lL][oO][cC][kK])|([eE][nN][dD])|([bB][yY][tT][eE])|([wW][oO][rR][dD])|([aA][dD][dD][rR][sS][sS])|([aA][sS][cC][iI][iI]))",
|
100
|
+
"name": "storage.type.pep8"
|
101
|
+
}
|
102
|
+
]
|
103
|
+
},
|
104
|
+
"strings": {
|
105
|
+
"patterns": [
|
106
|
+
{
|
107
|
+
"include": "#simple-string"
|
108
|
+
}
|
109
|
+
]
|
110
|
+
},
|
111
|
+
"variable": {
|
112
|
+
"patterns": [
|
113
|
+
{
|
114
|
+
"match": "[a-z][a-zA-Z0-9_]* *[:]?",
|
115
|
+
"name": "variable.other.pep8"
|
116
|
+
}
|
117
|
+
]
|
118
|
+
}
|
119
|
+
},
|
120
|
+
"scopeName": "source.pep8",
|
121
|
+
"uuid": "b2423139-ebee-4453-bb51-74755ea62af4"
|
122
|
+
}
|