Skip to content

Commit

Permalink
update grammars
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Apr 18, 2018
1 parent e02f59a commit 9d2814a
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 56 deletions.
102 changes: 63 additions & 39 deletions extensions/bat/syntaxes/batchfile.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/mmims/language-batchfile/commit/9b2d868a43d6a04a4dc27cb31f907b960a4fdab1",
"version": "https://github.com/mmims/language-batchfile/commit/6235c491be4dff49cd3966b50142874d7f79580a",
"name": "Batch File",
"scopeName": "source.batchfile",
"patterns": [
Expand Down Expand Up @@ -46,14 +46,17 @@
"commands": {
"patterns": [
{
"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)",
"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)",
"name": "keyword.command.batchfile"
},
{
"begin": "(?<=^|[\\s@])(?i:echo)(?=$|\\s|\\.)",
"begin": "(?i)(?<=^|[\\s@])(echo)(?:(?=$|\\.|:)|\\s+(?:(on|off)(?=\\s*$))?)",
"beginCaptures": {
"0": {
"1": {
"name": "keyword.command.batchfile"
},
"2": {
"name": "keyword.other.special-method.batchfile"
}
},
"end": "(?=$\\n|[&|><)])",
Expand All @@ -72,6 +75,17 @@
}
]
},
{
"match": "(?i)(?<=^|[\\s@])(setlocal)(?:\\s*$|\\s+(EnableExtensions|DisableExtensions|EnableDelayedExpansion|DisableDelayedExpansion)(?=\\s*$))",
"captures": {
"1": {
"name": "keyword.command.batchfile"
},
"2": {
"name": "keyword.other.special-method.batchfile"
}
}
},
{
"include": "#command_set"
}
Expand Down Expand Up @@ -110,36 +124,7 @@
"include": "#parens"
},
{
"begin": "(\")\\s*([^ ][^=]*)(=)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.string.begin.batchfile"
},
"2": {
"name": "variable.other.readwrite.batchfile"
},
"3": {
"name": "keyword.operator.assignment.batchfile"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.batchfile"
}
},
"name": "string.quoted.double.batchfile",
"patterns": [
{
"include": "#variables"
},
{
"include": "#numbers"
},
{
"include": "#parens"
}
]
"include": "#command_set_strings"
},
{
"include": "#strings"
Expand Down Expand Up @@ -216,6 +201,9 @@
"begin": "\\s+/[pP]\\s+",
"end": "(?=$\\n|[&|><)])",
"patterns": [
{
"include": "#command_set_strings"
},
{
"begin": "([^ ][^=]*)(=)",
"beginCaptures": {
Expand Down Expand Up @@ -295,6 +283,42 @@
}
]
},
"command_set_strings": {
"patterns": [
{
"begin": "(\")\\s*([^ ][^=]*)(=)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.string.begin.batchfile"
},
"2": {
"name": "variable.other.readwrite.batchfile"
},
"3": {
"name": "keyword.operator.assignment.batchfile"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.batchfile"
}
},
"name": "string.quoted.double.batchfile",
"patterns": [
{
"include": "#variables"
},
{
"include": "#numbers"
},
{
"include": "#escaped_characters"
}
]
}
]
},
"comments": {
"patterns": [
{
Expand Down Expand Up @@ -360,7 +384,7 @@
"controls": {
"patterns": [
{
"match": "(?<=^|\\s)(?i)(?:goto|call|exit)(?=$|\\s)",
"match": "(?i)(?<=^|\\s)(?:call|exit(?=$|\\s)|goto(?=$|\\s|:))",
"name": "keyword.control.statement.batchfile"
},
{
Expand Down Expand Up @@ -390,15 +414,15 @@
"escaped_characters": {
"patterns": [
{
"match": "%%|\\^\\^!|\\^.|\\^\\n",
"match": "%%|\\^\\^!|\\^(?=.)|\\^\\n",
"name": "constant.character.escape.batchfile"
}
]
},
"labels": {
"patterns": [
{
"match": "^\\s*(:)([^+=,;:\\s].*)$",
"match": "(?i)(?:^\\s*|(?<=goto)\\s*)(:)([^+=,;:\\s].*)$",
"captures": {
"1": {
"name": "punctuation.separator.batchfile"
Expand Down Expand Up @@ -433,11 +457,11 @@
"name": "keyword.operator.logical.batchfile"
},
{
"match": "&&?|\\|\\|",
"match": "(?<!\\^)&&?|\\|\\|",
"name": "keyword.operator.conditional.batchfile"
},
{
"match": "\\|",
"match": "(?<!\\^)\\|",
"name": "keyword.operator.pipe.batchfile"
},
{
Expand Down
13 changes: 12 additions & 1 deletion extensions/bat/test/colorize-results/test_bat.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
},
{
"c": " off",
"c": " ",
"t": "source.batchfile",
"r": {
"dark_plus": "default: #D4D4D4",
Expand All @@ -32,6 +32,17 @@
"hc_black": "default: #FFFFFF"
}
},
{
"c": "off",
"t": "source.batchfile keyword.other.special-method.batchfile",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6"
}
},
{
"c": "setlocal",
"t": "source.batchfile keyword.command.batchfile",
Expand Down
4 changes: 2 additions & 2 deletions extensions/javascript/syntaxes/JavaScript.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/929ee616cc9c299c5ed09d6051277a9c34e2d6e9",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3f27a794a2dbebf18714d7eaa799162fbadf7a11",
"name": "JavaScript (with React support)",
"scopeName": "source.js",
"patterns": [
Expand Down Expand Up @@ -2296,7 +2296,7 @@
"name": "keyword.operator.expression.instanceof.js"
}
},
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
"end": "(?<=\\))|(?=[;),}\\]:?]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
"patterns": [
{
"include": "#type"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/929ee616cc9c299c5ed09d6051277a9c34e2d6e9",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3f27a794a2dbebf18714d7eaa799162fbadf7a11",
"name": "JavaScript (with React support)",
"scopeName": "source.js.jsx",
"patterns": [
Expand Down Expand Up @@ -2296,7 +2296,7 @@
"name": "keyword.operator.expression.instanceof.js.jsx"
}
},
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
"end": "(?<=\\))|(?=[;),}\\]:?]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
"patterns": [
{
"include": "#type"
Expand Down
8 changes: 2 additions & 6 deletions extensions/log/syntaxes/log.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/emilast/vscode-logfile-highlighter/commit/73d0058c4712dc93bb4f8f6ca3629d421da0651d",
"version": "https://github.com/emilast/vscode-logfile-highlighter/commit/541479c15f46c5f3e504aafe058dd7b982ad932f",
"name": "Log file",
"scopeName": "text.log",
"patterns": [
Expand Down Expand Up @@ -69,7 +69,7 @@
"name": "string log.string"
},
{
"match": "'[^']*'",
"match": "(^|[^\\w])'[^']*'",
"name": "string log.string"
},
{
Expand All @@ -85,10 +85,6 @@
"match": "\\b(http|https|ftp|file)://\\S+\\b/?",
"name": "constant.language log.constant"
},
{
"match": "(([a-zA-Z]\\:)|(\\.\\.)|(\\.))?((/|\\\\)[\\w\\-\\.]*)",
"name": "constant.language log.constant"
},
{
"match": "\\b([\\w-]+\\.)+([\\w-])+\\b",
"name": "constant.language log.constant"
Expand Down
8 changes: 6 additions & 2 deletions extensions/r/syntaxes/r.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/Ikuyadeu/vscode-R/commit/b3ef459a3999160d97ea28f4754fda810417f99f",
"version": "https://github.com/Ikuyadeu/vscode-R/commit/1cd3d42a6b2e54276ef2d71fe33bb3fefb1d6cff",
"name": "R",
"scopeName": "source.r",
"patterns": [
Expand Down Expand Up @@ -168,6 +168,10 @@
"match": "(\\-|\\+|\\*|\\/|%\\/%|%%|%\\*%|%o%|%x%|\\^)",
"name": "keyword.operator.arithmetic.r"
},
{
"match": "<=|>=",
"name": "keyword.operator.comparison.r"
},
{
"match": "==",
"name": "keyword.operator.comarison.r"
Expand All @@ -177,7 +181,7 @@
"name": "keyword.operator.assignment.r"
},
{
"match": "(!=|<>|<|>|<=|>=|%in%)",
"match": "(!=|<>|<|>|%in%)",
"name": "keyword.operator.comparison.r"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/929ee616cc9c299c5ed09d6051277a9c34e2d6e9",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3f27a794a2dbebf18714d7eaa799162fbadf7a11",
"name": "TypeScript",
"scopeName": "source.ts",
"patterns": [
Expand Down Expand Up @@ -2293,7 +2293,7 @@
"name": "keyword.operator.expression.instanceof.ts"
}
},
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
"end": "(?<=\\))|(?=[;),}\\]:?]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
"patterns": [
{
"include": "#type"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/929ee616cc9c299c5ed09d6051277a9c34e2d6e9",
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3f27a794a2dbebf18714d7eaa799162fbadf7a11",
"name": "TypeScriptReact",
"scopeName": "source.tsx",
"patterns": [
Expand Down Expand Up @@ -2296,7 +2296,7 @@
"name": "keyword.operator.expression.instanceof.tsx"
}
},
"end": "(?<=\\))|(?=[;),}\\]:]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
"end": "(?<=\\))|(?=[;),}\\]:?]|\\|\\||\\&\\&|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
"patterns": [
{
"include": "#type"
Expand Down

0 comments on commit 9d2814a

Please sign in to comment.