Skip to content

Commit 884fced

Browse files
committed
Update grammars
1 parent 71bb111 commit 884fced

9 files changed

Lines changed: 89 additions & 43 deletions

File tree

extensions/perl/cgmanifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"git": {
77
"name": "textmate/perl.tmbundle",
88
"repositoryUrl": "https://github.com/textmate/perl.tmbundle",
9-
"commitHash": "d9841a0878239fa43f88c640f8d458590f97e8f5"
9+
"commitHash": "80826abe75250286c2a1a07958e50e8551d3f50c"
1010
}
1111
},
1212
"licenseDetail": [

extensions/python/cgmanifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"git": {
77
"name": "MagicStack/MagicPython",
88
"repositoryUrl": "https://github.com/MagicStack/MagicPython",
9-
"commitHash": "0b09c1fca238d22e15ac5712d03f9bf6da626f9c"
9+
"commitHash": "c9b3409deb69acec31bbf7913830e93a046b30cc"
1010
}
1111
},
1212
"license": "MIT",

extensions/python/syntaxes/MagicPython.tmLanguage.json

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/MagicStack/MagicPython/commit/0b09c1fca238d22e15ac5712d03f9bf6da626f9c",
7+
"version": "https://github.com/MagicStack/MagicPython/commit/2ca894f270f92e2bc8f09a2ebdcd482fbb3b1074",
88
"name": "MagicPython",
99
"scopeName": "source.python",
1010
"patterns": [
@@ -31,6 +31,9 @@
3131
{
3232
"include": "#function-declaration"
3333
},
34+
{
35+
"include": "#generator"
36+
},
3437
{
3538
"include": "#statement-keyword"
3639
},
@@ -291,6 +294,9 @@
291294
{
292295
"include": "#lambda"
293296
},
297+
{
298+
"include": "#generator"
299+
},
294300
{
295301
"include": "#illegal-operator"
296302
},
@@ -306,6 +312,9 @@
306312
{
307313
"include": "#list"
308314
},
315+
{
316+
"include": "#odd-function-call"
317+
},
309318
{
310319
"include": "#round-braces"
311320
},
@@ -388,6 +397,9 @@
388397
},
389398
{
390399
"include": "#member-access-base"
400+
},
401+
{
402+
"include": "#member-access-attribute"
391403
}
392404
]
393405
},
@@ -413,6 +425,11 @@
413425
}
414426
]
415427
},
428+
"member-access-attribute": {
429+
"comment": "Highlight attribute access in otherwise non-specialized cases.",
430+
"name": "meta.attribute.python",
431+
"match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
432+
},
416433
"special-names": {
417434
"name": "constant.other.caps.python",
418435
"match": "(?x)\n \\b\n # we want to see \"enough\", meaning 2 or more upper-case\n # letters in the beginning of the constant\n #\n # for more details refer to:\n # https://github.com/MagicStack/MagicPython/issues/42\n (\n _* [[:upper:]] [_\\d]* [[:upper:]]\n )\n [[:upper:]\\d]* (_\\w*)?\n \\b\n"
@@ -459,6 +476,21 @@
459476
}
460477
]
461478
},
479+
"odd-function-call": {
480+
"comment": "A bit obscured function call where there may have been an\narbitrary number of other operations to get the function.\nE.g. \"arr[idx](args)\"\n",
481+
"begin": "(?x)\n (?<= \\] | \\) ) \\s*\n (?=\\()\n",
482+
"end": "(\\))",
483+
"endCaptures": {
484+
"1": {
485+
"name": "punctuation.definition.arguments.end.python"
486+
}
487+
},
488+
"patterns": [
489+
{
490+
"include": "#function-arguments"
491+
}
492+
]
493+
},
462494
"round-braces": {
463495
"begin": "\\(",
464496
"end": "\\)",
@@ -1195,6 +1227,26 @@
11951227
}
11961228
]
11971229
},
1230+
"generator": {
1231+
"comment": "Match \"for ... in\" construct used in generators and for loops to\ncorrectly identify the \"in\" as a control flow keyword.\n",
1232+
"begin": "for",
1233+
"beginCaptures": {
1234+
"0": {
1235+
"name": "keyword.control.flow.python"
1236+
}
1237+
},
1238+
"end": "in",
1239+
"endCaptures": {
1240+
"0": {
1241+
"name": "keyword.control.flow.python"
1242+
}
1243+
},
1244+
"patterns": [
1245+
{
1246+
"include": "#expression"
1247+
}
1248+
]
1249+
},
11981250
"function-declaration": {
11991251
"name": "meta.function.python",
12001252
"begin": "(?x)\n \\s*\n (?:\\b(async) \\s+)? \\b(def)\\s+\n (?=\n [[:alpha:]_][[:word:]]* \\s* \\(\n )\n",
@@ -1407,6 +1459,7 @@
14071459
"include": "#special-names"
14081460
},
14091461
{
1462+
"name": "meta.indexed-name.python",
14101463
"match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
14111464
}
14121465
]
@@ -1524,6 +1577,7 @@
15241577
},
15251578
"function-call": {
15261579
"name": "meta.function-call.python",
1580+
"comment": "Regular function call of the type \"name(args)\"",
15271581
"begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n",
15281582
"end": "(\\))",
15291583
"endCaptures": {

extensions/python/test/colorize-results/test-freeze-56377_py.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,13 @@
254254
},
255255
{
256256
"c": "in",
257-
"t": "source.python keyword.operator.logical.python",
257+
"t": "source.python keyword.control.flow.python",
258258
"r": {
259-
"dark_plus": "keyword.operator.logical.python: #569CD6",
260-
"light_plus": "keyword.operator.logical.python: #0000FF",
261-
"dark_vs": "keyword.operator.logical.python: #569CD6",
262-
"light_vs": "keyword.operator.logical.python: #0000FF",
263-
"hc_black": "keyword.operator.logical.python: #569CD6"
259+
"dark_plus": "keyword.control: #C586C0",
260+
"light_plus": "keyword.control: #AF00DB",
261+
"dark_vs": "keyword.control: #569CD6",
262+
"light_vs": "keyword.control: #0000FF",
263+
"hc_black": "keyword.control: #C586C0"
264264
}
265265
},
266266
{
@@ -298,7 +298,7 @@
298298
},
299299
{
300300
"c": "request",
301-
"t": "source.python meta.member.access.python",
301+
"t": "source.python meta.member.access.python meta.attribute.python",
302302
"r": {
303303
"dark_plus": "default: #D4D4D4",
304304
"light_plus": "default: #000000",

extensions/python/test/colorize-results/test_py.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@
430430
},
431431
{
432432
"c": "size",
433-
"t": "source.python meta.member.access.python",
433+
"t": "source.python meta.member.access.python meta.attribute.python",
434434
"r": {
435435
"dark_plus": "default: #D4D4D4",
436436
"light_plus": "default: #000000",
@@ -914,13 +914,13 @@
914914
},
915915
{
916916
"c": "in",
917-
"t": "source.python meta.function.python meta.function.parameters.python keyword.operator.logical.python",
917+
"t": "source.python meta.function.python meta.function.parameters.python keyword.control.flow.python",
918918
"r": {
919-
"dark_plus": "keyword.operator.logical.python: #569CD6",
920-
"light_plus": "keyword.operator.logical.python: #0000FF",
921-
"dark_vs": "keyword.operator.logical.python: #569CD6",
922-
"light_vs": "keyword.operator.logical.python: #0000FF",
923-
"hc_black": "keyword.operator.logical.python: #569CD6"
919+
"dark_plus": "keyword.control: #C586C0",
920+
"light_plus": "keyword.control: #AF00DB",
921+
"dark_vs": "keyword.control: #569CD6",
922+
"light_vs": "keyword.control: #0000FF",
923+
"hc_black": "keyword.control: #C586C0"
924924
}
925925
},
926926
{
@@ -2113,13 +2113,13 @@
21132113
},
21142114
{
21152115
"c": "in",
2116-
"t": "source.python keyword.operator.logical.python",
2116+
"t": "source.python keyword.control.flow.python",
21172117
"r": {
2118-
"dark_plus": "keyword.operator.logical.python: #569CD6",
2119-
"light_plus": "keyword.operator.logical.python: #0000FF",
2120-
"dark_vs": "keyword.operator.logical.python: #569CD6",
2121-
"light_vs": "keyword.operator.logical.python: #0000FF",
2122-
"hc_black": "keyword.operator.logical.python: #569CD6"
2118+
"dark_plus": "keyword.control: #C586C0",
2119+
"light_plus": "keyword.control: #AF00DB",
2120+
"dark_vs": "keyword.control: #569CD6",
2121+
"light_vs": "keyword.control: #0000FF",
2122+
"hc_black": "keyword.control: #C586C0"
21232123
}
21242124
},
21252125
{
@@ -4544,7 +4544,7 @@
45444544
},
45454545
{
45464546
"c": "fn",
4547-
"t": "source.python meta.member.access.python",
4547+
"t": "source.python meta.member.access.python meta.attribute.python",
45484548
"r": {
45494549
"dark_plus": "default: #D4D4D4",
45504550
"light_plus": "default: #000000",
@@ -4621,7 +4621,7 @@
46214621
},
46224622
{
46234623
"c": "memo",
4624-
"t": "source.python meta.member.access.python",
4624+
"t": "source.python meta.member.access.python meta.attribute.python",
46254625
"r": {
46264626
"dark_plus": "default: #D4D4D4",
46274627
"light_plus": "default: #000000",
@@ -4918,7 +4918,7 @@
49184918
},
49194919
{
49204920
"c": "memo",
4921-
"t": "source.python meta.member.access.python",
4921+
"t": "source.python meta.member.access.python meta.attribute.python",
49224922
"r": {
49234923
"dark_plus": "default: #D4D4D4",
49244924
"light_plus": "default: #000000",
@@ -4973,7 +4973,7 @@
49734973
},
49744974
{
49754975
"c": "memo",
4976-
"t": "source.python meta.member.access.python meta.item-access.python",
4976+
"t": "source.python meta.member.access.python meta.item-access.python meta.indexed-name.python",
49774977
"r": {
49784978
"dark_plus": "default: #D4D4D4",
49794979
"light_plus": "default: #000000",
@@ -5182,7 +5182,7 @@
51825182
},
51835183
{
51845184
"c": "memo",
5185-
"t": "source.python meta.member.access.python meta.item-access.python",
5185+
"t": "source.python meta.member.access.python meta.item-access.python meta.indexed-name.python",
51865186
"r": {
51875187
"dark_plus": "default: #D4D4D4",
51885188
"light_plus": "default: #000000",
@@ -6797,4 +6797,4 @@
67976797
"hc_black": "string: #CE9178"
67986798
}
67996799
}
6800-
]
6800+
]

extensions/r/cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"git": {
77
"name": "Ikuyadeu/vscode-R",
88
"repositoryUrl": "https://github.com/Ikuyadeu/vscode-R",
9-
"commitHash": "bc79e9245682ee09b4f0b742b927a37702d91b82"
9+
"commitHash": "e03ba9cb9b19412f48c73ea73deb6746d50bbf23"
1010
}
1111
},
1212
"license": "MIT",
13-
"version": "1.1.8"
13+
"version": "1.3.0"
1414
}
1515
],
1616
"version": 1

extensions/r/syntaxes/r.tmLanguage.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/Ikuyadeu/vscode-R/commit/bc79e9245682ee09b4f0b742b927a37702d91b82",
7+
"version": "https://github.com/Ikuyadeu/vscode-R/commit/e03ba9cb9b19412f48c73ea73deb6746d50bbf23",
88
"name": "R",
99
"scopeName": "source.r",
1010
"patterns": [
@@ -168,20 +168,12 @@
168168
"match": "(\\-|\\+|\\*|\\/|%\\/%|%%|%\\*%|%o%|%x%|\\^)",
169169
"name": "keyword.operator.arithmetic.r"
170170
},
171-
{
172-
"match": "<=|>=",
173-
"name": "keyword.operator.comparison.r"
174-
},
175-
{
176-
"match": "==",
177-
"name": "keyword.operator.comarison.r"
178-
},
179171
{
180172
"match": "(:=|<-|<<-|->|->>)",
181173
"name": "keyword.operator.assignment.r"
182174
},
183175
{
184-
"match": "(!=|<>|<|>|%in%)",
176+
"match": "(==|<=|>=|!=|<>|<|>|%in%)",
185177
"name": "keyword.operator.comparison.r"
186178
},
187179
{

extensions/sql/cgmanifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"git": {
77
"name": "Microsoft/vscode-mssql",
88
"repositoryUrl": "https://github.com/Microsoft/vscode-mssql",
9-
"commitHash": "a542fe96780e6b274adb281810d419a512fb5bb4"
9+
"commitHash": "37a22725186b5b481b2882a78c7b9fe024c13946"
1010
}
1111
},
1212
"license": "MIT",

extensions/sql/syntaxes/sql.tmLanguage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/Microsoft/vscode-mssql/commit/a542fe96780e6b274adb281810d419a512fb5bb4",
7+
"version": "https://github.com/Microsoft/vscode-mssql/commit/37a22725186b5b481b2882a78c7b9fe024c13946",
88
"name": "SQL",
99
"scopeName": "source.sql",
1010
"patterns": [

0 commit comments

Comments
 (0)