Skip to content

Commit 9d2814a

Browse files
committed
update grammars
1 parent e02f59a commit 9d2814a

8 files changed

Lines changed: 91 additions & 56 deletions

File tree

‎extensions/bat/syntaxes/batchfile.tmLanguage.json‎

Lines changed: 63 additions & 39 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/mmims/language-batchfile/commit/9b2d868a43d6a04a4dc27cb31f907b960a4fdab1",
7+
"version": "https://github.com/mmims/language-batchfile/commit/6235c491be4dff49cd3966b50142874d7f79580a",
88
"name": "Batch File",
99
"scopeName": "source.batchfile",
1010
"patterns": [
@@ -46,14 +46,17 @@
4646
"commands": {
4747
"patterns": [
4848
{
49-
"match": "(?<=^|[\\s@])(?i:adprep|append|arp|assoc|at|atmadm|attrib|auditpol|autochk|autoconv|autofmt|bcdboot|bcdedit|bdehdcfg|bitsadmin|bootcfg|brea|cacls|cd|certreq|certutil|change|chcp|chdir|chglogon|chgport|chgusr|chkdsk|chkntfs|choice|cipher|clip|clscluadmin|cluster|cmd|cmdkey|cmstp|color|comp|compact|convert|copy|cprofile|cscript|csvde|date|dcdiag|dcgpofix|dcpromo|defra|del|dfscmd|dfsdiag|dfsrmig|diantz|dir|dirquota|diskcomp|diskcopy|diskpart|diskperf|diskraid|diskshadow|dispdiag|doin|dnscmd|doskey|driverquery|dsacls|dsadd|dsamain|dsdbutil|dsget|dsmgmt|dsmod|dsmove|dsquery|dsrm|edit|endlocal|eraseesentutl|eventcreate|eventquery|eventtriggers|evntcmd|expand|extract|fc|filescrn|find|findstr|finger|flattemp|fonde|forfiles|format|freedisk|fsutil|ftp|ftype|fveupdate|getmac|gettype|gpfixup|gpresult|gpupdate|graftabl|hashgen|hep|helpctr|hostname|icacls|iisreset|inuse|ipconfig|ipxroute|irftp|ismserv|jetpack|klist|ksetup|ktmutil|ktpass|label|ldifd|ldp|lodctr|logman|logoff|lpq|lpr|macfile|makecab|manage-bde|mapadmin|md|mkdir|mklink|mmc|mode|more|mount|mountvol|move|mqbup|mqsvc|mqtgsvc|msdt|msg|msiexec|msinfo32|mstsc|nbtstat|net computer|net group|net localgroup|net print|net session|net share|net start|net stop|net use|net user|net view|net|netcfg|netdiag|netdom|netsh|netstat|nfsadmin|nfsshare|nfsstat|nlb|nlbmgr|nltest|nslookup|ntackup|ntcmdprompt|ntdsutil|ntfrsutl|openfiles|pagefileconfig|path|pathping|pause|pbadmin|pentnt|perfmon|ping|pnpunatten|pnputil|popd|powercfg|powershell|powershell_ise|print|prncnfg|prndrvr|prnjobs|prnmngr|prnport|prnqctl|prompt|pubprn|pushd|pushprinterconnections|pwlauncher|qappsrv|qprocess|query|quser|qwinsta|rasdial|rcp|rd|rdpsign|regentc|recover|redircmp|redirusr|reg|regini|regsvr32|relog|ren|rename|rendom|repadmin|repair-bde|replace|reset session|rxec|risetup|rmdir|robocopy|route|rpcinfo|rpcping|rsh|runas|rundll32|rwinsta|sc|schtasks|scwcmd|secedit|serverceipoptin|servrmanagercmd|serverweroptin|setlocal|setspn|setx|sfc|shadow|shift|showmount|shutdown|sort|start|storrept|subst|sxstrace|ysocmgr|systeminfo|takeown|tapicfg|taskkill|tasklist|tcmsetup|telnet|tftp|time|timeout|title|tlntadmn|tpmvscmgr|tpmvscmgr|tacerpt|tracert|tree|tscon|tsdiscon|tsecimp|tskill|tsprof|type|typeperf|tzutil|uddiconfig|umount|unlodctr|ver|verifier|verif|vol|vssadmin|w32tm|waitfor|wbadmin|wdsutil|wecutil|wevtutil|where|whoami|winnt|winnt32|winpop|winrm|winrs|winsat|wlbs|mic|wscript|xcopy)(?=$|\\s)",
49+
"match": "(?<=^|[\\s@])(?i:adprep|append|arp|assoc|at|atmadm|attrib|auditpol|autochk|autoconv|autofmt|bcdboot|bcdedit|bdehdcfg|bitsadmin|bootcfg|brea|cacls|cd|certreq|certutil|change|chcp|chdir|chglogon|chgport|chgusr|chkdsk|chkntfs|choice|cipher|clip|cls|clscluadmin|cluster|cmd|cmdkey|cmstp|color|comp|compact|convert|copy|cprofile|cscript|csvde|date|dcdiag|dcgpofix|dcpromo|defra|del|dfscmd|dfsdiag|dfsrmig|diantz|dir|dirquota|diskcomp|diskcopy|diskpart|diskperf|diskraid|diskshadow|dispdiag|doin|dnscmd|doskey|driverquery|dsacls|dsadd|dsamain|dsdbutil|dsget|dsmgmt|dsmod|dsmove|dsquery|dsrm|edit|endlocal|eraseesentutl|eventcreate|eventquery|eventtriggers|evntcmd|expand|extract|fc|filescrn|find|findstr|finger|flattemp|fonde|forfiles|format|freedisk|fsutil|ftp|ftype|fveupdate|getmac|gettype|gpfixup|gpresult|gpupdate|graftabl|hashgen|hep|helpctr|hostname|icacls|iisreset|inuse|ipconfig|ipxroute|irftp|ismserv|jetpack|klist|ksetup|ktmutil|ktpass|label|ldifd|ldp|lodctr|logman|logoff|lpq|lpr|macfile|makecab|manage-bde|mapadmin|md|mkdir|mklink|mmc|mode|more|mount|mountvol|move|mqbup|mqsvc|mqtgsvc|msdt|msg|msiexec|msinfo32|mstsc|nbtstat|net computer|net group|net localgroup|net print|net session|net share|net start|net stop|net use|net user|net view|net|netcfg|netdiag|netdom|netsh|netstat|nfsadmin|nfsshare|nfsstat|nlb|nlbmgr|nltest|nslookup|ntackup|ntcmdprompt|ntdsutil|ntfrsutl|openfiles|pagefileconfig|path|pathping|pause|pbadmin|pentnt|perfmon|ping|pnpunatten|pnputil|popd|powercfg|powershell|powershell_ise|print|prncnfg|prndrvr|prnjobs|prnmngr|prnport|prnqctl|prompt|pubprn|pushd|pushprinterconnections|pwlauncher|qappsrv|qprocess|query|quser|qwinsta|rasdial|rcp|rd|rdpsign|regentc|recover|redircmp|redirusr|reg|regini|regsvr32|relog|ren|rename|rendom|repadmin|repair-bde|replace|reset session|rxec|risetup|rmdir|robocopy|route|rpcinfo|rpcping|rsh|runas|rundll32|rwinsta|sc|schtasks|scwcmd|secedit|serverceipoptin|servrmanagercmd|serverweroptin|setspn|setx|sfc|shadow|shift|showmount|shutdown|sort|start|storrept|subst|sxstrace|ysocmgr|systeminfo|takeown|tapicfg|taskkill|tasklist|tcmsetup|telnet|tftp|time|timeout|title|tlntadmn|tpmvscmgr|tpmvscmgr|tacerpt|tracert|tree|tscon|tsdiscon|tsecimp|tskill|tsprof|type|typeperf|tzutil|uddiconfig|umount|unlodctr|ver|verifier|verif|vol|vssadmin|w32tm|waitfor|wbadmin|wdsutil|wecutil|wevtutil|where|whoami|winnt|winnt32|winpop|winrm|winrs|winsat|wlbs|mic|wscript|xcopy)(?=$|\\s)",
5050
"name": "keyword.command.batchfile"
5151
},
5252
{
53-
"begin": "(?<=^|[\\s@])(?i:echo)(?=$|\\s|\\.)",
53+
"begin": "(?i)(?<=^|[\\s@])(echo)(?:(?=$|\\.|:)|\\s+(?:(on|off)(?=\\s*$))?)",
5454
"beginCaptures": {
55-
"0": {
55+
"1": {
5656
"name": "keyword.command.batchfile"
57+
},
58+
"2": {
59+
"name": "keyword.other.special-method.batchfile"
5760
}
5861
},
5962
"end": "(?=$\\n|[&|><)])",
@@ -72,6 +75,17 @@
7275
}
7376
]
7477
},
78+
{
79+
"match": "(?i)(?<=^|[\\s@])(setlocal)(?:\\s*$|\\s+(EnableExtensions|DisableExtensions|EnableDelayedExpansion|DisableDelayedExpansion)(?=\\s*$))",
80+
"captures": {
81+
"1": {
82+
"name": "keyword.command.batchfile"
83+
},
84+
"2": {
85+
"name": "keyword.other.special-method.batchfile"
86+
}
87+
}
88+
},
7589
{
7690
"include": "#command_set"
7791
}
@@ -110,36 +124,7 @@
110124
"include": "#parens"
111125
},
112126
{
113-
"begin": "(\")\\s*([^ ][^=]*)(=)",
114-
"beginCaptures": {
115-
"1": {
116-
"name": "punctuation.definition.string.begin.batchfile"
117-
},
118-
"2": {
119-
"name": "variable.other.readwrite.batchfile"
120-
},
121-
"3": {
122-
"name": "keyword.operator.assignment.batchfile"
123-
}
124-
},
125-
"end": "\"",
126-
"endCaptures": {
127-
"0": {
128-
"name": "punctuation.definition.string.end.batchfile"
129-
}
130-
},
131-
"name": "string.quoted.double.batchfile",
132-
"patterns": [
133-
{
134-
"include": "#variables"
135-
},
136-
{
137-
"include": "#numbers"
138-
},
139-
{
140-
"include": "#parens"
141-
}
142-
]
127+
"include": "#command_set_strings"
143128
},
144129
{
145130
"include": "#strings"
@@ -216,6 +201,9 @@
216201
"begin": "\\s+/[pP]\\s+",
217202
"end": "(?=$\\n|[&|><)])",
218203
"patterns": [
204+
{
205+
"include": "#command_set_strings"
206+
},
219207
{
220208
"begin": "([^ ][^=]*)(=)",
221209
"beginCaptures": {
@@ -295,6 +283,42 @@
295283
}
296284
]
297285
},
286+
"command_set_strings": {
287+
"patterns": [
288+
{
289+
"begin": "(\")\\s*([^ ][^=]*)(=)",
290+
"beginCaptures": {
291+
"1": {
292+
"name": "punctuation.definition.string.begin.batchfile"
293+
},
294+
"2": {
295+
"name": "variable.other.readwrite.batchfile"
296+
},
297+
"3": {
298+
"name": "keyword.operator.assignment.batchfile"
299+
}
300+
},
301+
"end": "\"",
302+
"endCaptures": {
303+
"0": {
304+
"name": "punctuation.definition.string.end.batchfile"
305+
}
306+
},
307+
"name": "string.quoted.double.batchfile",
308+
"patterns": [
309+
{
310+
"include": "#variables"
311+
},
312+
{
313+
"include": "#numbers"
314+
},
315+
{
316+
"include": "#escaped_characters"
317+
}
318+
]
319+
}
320+
]
321+
},
298322
"comments": {
299323
"patterns": [
300324
{
@@ -360,7 +384,7 @@
360384
"controls": {
361385
"patterns": [
362386
{
363-
"match": "(?<=^|\\s)(?i)(?:goto|call|exit)(?=$|\\s)",
387+
"match": "(?i)(?<=^|\\s)(?:call|exit(?=$|\\s)|goto(?=$|\\s|:))",
364388
"name": "keyword.control.statement.batchfile"
365389
},
366390
{
@@ -390,15 +414,15 @@
390414
"escaped_characters": {
391415
"patterns": [
392416
{
393-
"match": "%%|\\^\\^!|\\^.|\\^\\n",
417+
"match": "%%|\\^\\^!|\\^(?=.)|\\^\\n",
394418
"name": "constant.character.escape.batchfile"
395419
}
396420
]
397421
},
398422
"labels": {
399423
"patterns": [
400424
{
401-
"match": "^\\s*(:)([^+=,;:\\s].*)$",
425+
"match": "(?i)(?:^\\s*|(?<=goto)\\s*)(:)([^+=,;:\\s].*)$",
402426
"captures": {
403427
"1": {
404428
"name": "punctuation.separator.batchfile"
@@ -433,11 +457,11 @@
433457
"name": "keyword.operator.logical.batchfile"
434458
},
435459
{
436-
"match": "&&?|\\|\\|",
460+
"match": "(?<!\\^)&&?|\\|\\|",
437461
"name": "keyword.operator.conditional.batchfile"
438462
},
439463
{
440-
"match": "\\|",
464+
"match": "(?<!\\^)\\|",
441465
"name": "keyword.operator.pipe.batchfile"
442466
},
443467
{

‎extensions/bat/test/colorize-results/test_bat.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
},
2424
{
25-
"c": " off",
25+
"c": " ",
2626
"t": "source.batchfile",
2727
"r": {
2828
"dark_plus": "default: #D4D4D4",
@@ -32,6 +32,17 @@
3232
"hc_black": "default: #FFFFFF"
3333
}
3434
},
35+
{
36+
"c": "off",
37+
"t": "source.batchfile keyword.other.special-method.batchfile",
38+
"r": {
39+
"dark_plus": "keyword: #569CD6",
40+
"light_plus": "keyword: #0000FF",
41+
"dark_vs": "keyword: #569CD6",
42+
"light_vs": "keyword: #0000FF",
43+
"hc_black": "keyword: #569CD6"
44+
}
45+
},
3546
{
3647
"c": "setlocal",
3748
"t": "source.batchfile keyword.command.batchfile",

‎extensions/javascript/syntaxes/JavaScript.tmLanguage.json‎

Lines changed: 2 additions & 2 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/Microsoft/TypeScript-TmLanguage/commit/929ee616cc9c299c5ed09d6051277a9c34e2d6e9",
7+
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3f27a794a2dbebf18714d7eaa799162fbadf7a11",
88
"name": "JavaScript (with React support)",
99
"scopeName": "source.js",
1010
"patterns": [
@@ -2296,7 +2296,7 @@
22962296
"name": "keyword.operator.expression.instanceof.js"
22972297
}
22982298
},
2299-
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
2299+
"end": "(?<=\\))|(?=[;),}\\]:?]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
23002300
"patterns": [
23012301
{
23022302
"include": "#type"

‎extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json‎

Lines changed: 2 additions & 2 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/Microsoft/TypeScript-TmLanguage/commit/929ee616cc9c299c5ed09d6051277a9c34e2d6e9",
7+
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3f27a794a2dbebf18714d7eaa799162fbadf7a11",
88
"name": "JavaScript (with React support)",
99
"scopeName": "source.js.jsx",
1010
"patterns": [
@@ -2296,7 +2296,7 @@
22962296
"name": "keyword.operator.expression.instanceof.js.jsx"
22972297
}
22982298
},
2299-
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
2299+
"end": "(?<=\\))|(?=[;),}\\]:?]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
23002300
"patterns": [
23012301
{
23022302
"include": "#type"

‎extensions/log/syntaxes/log.tmLanguage.json‎

Lines changed: 2 additions & 6 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/emilast/vscode-logfile-highlighter/commit/73d0058c4712dc93bb4f8f6ca3629d421da0651d",
7+
"version": "https://github.com/emilast/vscode-logfile-highlighter/commit/541479c15f46c5f3e504aafe058dd7b982ad932f",
88
"name": "Log file",
99
"scopeName": "text.log",
1010
"patterns": [
@@ -69,7 +69,7 @@
6969
"name": "string log.string"
7070
},
7171
{
72-
"match": "'[^']*'",
72+
"match": "(^|[^\\w])'[^']*'",
7373
"name": "string log.string"
7474
},
7575
{
@@ -85,10 +85,6 @@
8585
"match": "\\b(http|https|ftp|file)://\\S+\\b/?",
8686
"name": "constant.language log.constant"
8787
},
88-
{
89-
"match": "(([a-zA-Z]\\:)|(\\.\\.)|(\\.))?((/|\\\\)[\\w\\-\\.]*)",
90-
"name": "constant.language log.constant"
91-
},
9288
{
9389
"match": "\\b([\\w-]+\\.)+([\\w-])+\\b",
9490
"name": "constant.language log.constant"

‎extensions/r/syntaxes/r.tmLanguage.json‎

Lines changed: 6 additions & 2 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/b3ef459a3999160d97ea28f4754fda810417f99f",
7+
"version": "https://github.com/Ikuyadeu/vscode-R/commit/1cd3d42a6b2e54276ef2d71fe33bb3fefb1d6cff",
88
"name": "R",
99
"scopeName": "source.r",
1010
"patterns": [
@@ -168,6 +168,10 @@
168168
"match": "(\\-|\\+|\\*|\\/|%\\/%|%%|%\\*%|%o%|%x%|\\^)",
169169
"name": "keyword.operator.arithmetic.r"
170170
},
171+
{
172+
"match": "<=|>=",
173+
"name": "keyword.operator.comparison.r"
174+
},
171175
{
172176
"match": "==",
173177
"name": "keyword.operator.comarison.r"
@@ -177,7 +181,7 @@
177181
"name": "keyword.operator.assignment.r"
178182
},
179183
{
180-
"match": "(!=|<>|<|>|<=|>=|%in%)",
184+
"match": "(!=|<>|<|>|%in%)",
181185
"name": "keyword.operator.comparison.r"
182186
},
183187
{

‎extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json‎

Lines changed: 2 additions & 2 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/Microsoft/TypeScript-TmLanguage/commit/929ee616cc9c299c5ed09d6051277a9c34e2d6e9",
7+
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3f27a794a2dbebf18714d7eaa799162fbadf7a11",
88
"name": "TypeScript",
99
"scopeName": "source.ts",
1010
"patterns": [
@@ -2293,7 +2293,7 @@
22932293
"name": "keyword.operator.expression.instanceof.ts"
22942294
}
22952295
},
2296-
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
2296+
"end": "(?<=\\))|(?=[;),}\\]:?]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
22972297
"patterns": [
22982298
{
22992299
"include": "#type"

‎extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json‎

Lines changed: 2 additions & 2 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/Microsoft/TypeScript-TmLanguage/commit/929ee616cc9c299c5ed09d6051277a9c34e2d6e9",
7+
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3f27a794a2dbebf18714d7eaa799162fbadf7a11",
88
"name": "TypeScriptReact",
99
"scopeName": "source.tsx",
1010
"patterns": [
@@ -2296,7 +2296,7 @@
22962296
"name": "keyword.operator.expression.instanceof.tsx"
22972297
}
22982298
},
2299-
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
2299+
"end": "(?<=\\))|(?=[;),}\\]:?]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
23002300
"patterns": [
23012301
{
23022302
"include": "#type"

0 commit comments

Comments
 (0)