diff --git a/.editorconfig b/.editorconfig
index b4180a87dd7..e7e99b5bcb5 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,4 +1,4 @@
-# EditorConfig is awesome: http://EditorConfig.org
+# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
@@ -6,7 +6,6 @@ root = true
# Tab indentation
[*]
indent_style = tab
-indent_size = 4
trim_trailing_whitespace = true
# The indent size used in the `package.json` file cannot be changed
diff --git a/.gitattributes b/.gitattributes
index 0a56ba75f93..5a817c30b6d 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -6,4 +6,5 @@ ThirdPartyNotices.txt eol=crlf
*.bat eol=crlf
*.cmd eol=crlf
*.ps1 eol=lf
-*.sh eol=lf
\ No newline at end of file
+*.sh eol=lf
+*.rtf -text
\ No newline at end of file
diff --git a/.github/calendar.yml b/.github/calendar.yml
index 307c3db379a..f149579600b 100644
--- a/.github/calendar.yml
+++ b/.github/calendar.yml
@@ -31,5 +31,7 @@
'2018-09-24 18:00, US/Pacific': 'endgame',
'2018-10-08 09:00, US/Pacific': 'development', # 1.28.0 released
'2018-10-29 18:00, US/Pacific': 'endgame',
- # '2018-11-07 09:00, US/Pacific': 'development', # 1.29.0 released
+ '2018-11-12 11:00, US/Pacific': 'development', # 1.29.0 released
+ '2018-12-03 18:00, US/Pacific': 'endgame',
+ '2018-12-12 13:00, US/Pacific': 'development', # 1.30.0 released
}
diff --git a/.github/classifier.yml b/.github/classifier.yml
index 07b85720764..3236507a472 100644
--- a/.github/classifier.yml
+++ b/.github/classifier.yml
@@ -12,7 +12,7 @@
cli: [],
color-palette: [],
config: [],
- css-less-scss: [ aeschli ],
+ css-less-scss: [],
debug-console: [],
debug: {
assignees: [ weinand ],
@@ -52,7 +52,7 @@
editor-symbols: [],
editor-textbuffer: [],
editor-wrapping: [],
- emmet: [ ramya-rao-a ],
+ emmet: [ octref, ramya-rao-a ],
error-list: [],
explorer-custom: [],
extension-host: [],
@@ -76,12 +76,12 @@
assignLabel: false
},
formatting: [],
- git: [ joaomoreno ],
+ git: [],
grammar: [],
hot-exit: [],
- html: [ aeschli ],
+ html: [],
install-update: [],
- integrated-terminal: [],
+ integrated-terminal: [ Tyriar ],
integration-test: [],
intellisense-config: [],
issue-reporter: [ RMacfarlane ],
@@ -131,7 +131,7 @@
assignLabel: false
},
suggest: [],
- tasks: [ dbaeumer ],
+ tasks: [ alexr00 ],
telemetry: [],
themes: [],
tokenization: [],
diff --git a/.github/commands.yml b/.github/commands.yml
index 95a3df06c5b..f20079caab8 100644
--- a/.github/commands.yml
+++ b/.github/commands.yml
@@ -1,9 +1,17 @@
{
perform: true,
commands: [
+ {
+ type: 'comment',
+ name: 'question',
+ allowUsers: ['cleidigh', 'usernamehw'],
+ action: 'updateLabels',
+ addLabel: '*question'
+ },
{
type: 'label',
name: '*question',
+ allowTriggerByBot: true,
action: 'close',
comment: "Please ask your question on [StackOverflow](https://aka.ms/vscodestackoverflow). We have a great community over [there](https://aka.ms/vscodestackoverflow). They have already answered thousands of questions and are happy to answer yours as well. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!"
},
@@ -43,6 +51,12 @@
action: 'close',
comment: "The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!"
},
+ {
+ type: 'label',
+ name: '*english-please',
+ action: 'close',
+ comment: "This issue is being closed because its description is not in English, that makes it hard for us to work on it. Please open a new issue with an English description. You might find [Bing Translator](https://www.bing.com/translator) useful."
+ },
{
type: 'comment',
name: 'duplicate',
@@ -62,7 +76,16 @@
name: 'confirm',
allowUsers: ['cleidigh', 'usernamehw'],
action: 'updateLabels',
- addLabel: 'confirmed'
+ addLabel: 'confirmed',
+ removeLabel: 'confirmation-pending'
+ },
+ {
+ type: 'comment',
+ name: 'confirmationPending',
+ allowUsers: ['cleidigh', 'usernamehw'],
+ action: 'updateLabels',
+ addLabel: 'confirmation-pending',
+ removeLabel: 'confirmed'
},
{
type: 'comment',
diff --git a/.nvmrc b/.nvmrc
index 32c861f970d..f599e28b8ab 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-8.9.2
+10
diff --git a/.vscode/cgmanifest.schema.json b/.vscode/cgmanifest.schema.json
index f5424e3b226..2e719b02396 100644
--- a/.vscode/cgmanifest.schema.json
+++ b/.vscode/cgmanifest.schema.json
@@ -120,7 +120,7 @@
"type": "string",
"description": "The name of the license"
},
- "isOnlyDevelopmentDependency": {
+ "developmentDependency": {
"type": "boolean",
"description": "This component is inlined in the vscode repo and **is not shipped**."
},
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 89dc16fb181..bd9e290ab21 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -22,13 +22,11 @@
]
},
{
- "type": "node",
+ "type": "chrome",
"request": "attach",
"name": "Attach to Shared Process",
- "port": 5871,
- "outFiles": [
- "${workspaceFolder}/out/**/*.js"
- ]
+ "port": 9222,
+ "urlFilter": "*"
},
{
"type": "node",
@@ -125,7 +123,8 @@
"request": "launch",
"name": "Launch VS Code",
"windows": {
- "runtimeExecutable": "${workspaceFolder}/scripts/code.bat"
+ "runtimeExecutable": "${workspaceFolder}/scripts/code.bat",
+ "timeout": 20000
},
"osx": {
"runtimeExecutable": "${workspaceFolder}/scripts/code.sh"
@@ -133,26 +132,28 @@
"linux": {
"runtimeExecutable": "${workspaceFolder}/scripts/code.sh"
},
+ "env": {
+ "VSCODE_EXTHOST_WILL_SEND_SOCKET": null
+ },
+ "breakOnLoad": false,
"urlFilter": "*workbench.html*",
"runtimeArgs": [
- "--inspect=5875", "--no-cached-data"
- ],
- "skipFiles": [
- "**/winjs*.js"
+ "--inspect=5875",
+ "--no-cached-data"
],
"webRoot": "${workspaceFolder}"
},
{
- "type": "node",
- "request": "launch",
- "name": "Launch VS Code (Main Process)",
- "runtimeExecutable": "${workspaceFolder}/scripts/code.sh",
- "runtimeArgs": [
- "--no-cached-data"
- ],
- "outFiles": [
- "${workspaceFolder}/out/**/*.js"
- ]
+ "type": "node",
+ "request": "launch",
+ "name": "Launch VS Code (Main Process)",
+ "runtimeExecutable": "${workspaceFolder}/scripts/code.sh",
+ "runtimeArgs": [
+ "--no-cached-data"
+ ],
+ "outFiles": [
+ "${workspaceFolder}/out/**/*.js"
+ ]
},
{
"type": "node",
@@ -196,8 +197,8 @@
{
"type": "node",
"request": "launch",
- "name": "Unit Tests",
- "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "name": "Run Unit Tests",
+ "program": "${workspaceFolder}/test/electron/index.js",
"runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.app/Contents/MacOS/Electron",
"windows": {
"runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.exe"
@@ -207,14 +208,9 @@
},
"outputCapture": "std",
"args": [
- "--delay",
- "--timeout",
- "2000"
+ "--remote-debugging-port=9222"
],
"cwd": "${workspaceFolder}",
- "env": {
- "ELECTRON_RUN_AS_NODE": "true"
- },
"outFiles": [
"${workspaceFolder}/out/**/*.js"
]
@@ -271,6 +267,13 @@
"Launch VS Code",
"Attach to Extension Host"
]
- }
+ },
+ {
+ "name": "Debug Unit Tests",
+ "configurations": [
+ "Attach to VS Code",
+ "Run Unit Tests"
+ ]
+ },
]
}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 8b9ca6cd07b..af8b3803709 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -42,11 +42,19 @@
"emmet.excludeLanguages": [],
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.quoteStyle": "single",
- "json.schemas": [{
- "fileMatch": [ "cgmanifest.json" ],
- "url": "./.vscode/cgmanifest.schema.json"
- }, {
- "fileMatch": [ "cglicenses.json" ],
- "url": "./.vscode/cglicenses.schema.json"
- }]
-}
+ "json.schemas": [
+ {
+ "fileMatch": [
+ "cgmanifest.json"
+ ],
+ "url": "./.vscode/cgmanifest.schema.json"
+ },
+ {
+ "fileMatch": [
+ "cglicenses.json"
+ ],
+ "url": "./.vscode/cglicenses.schema.json"
+ }
+ ],
+ "git.ignoreLimitWarning": true
+}
\ No newline at end of file
diff --git a/.vscode/shared.code-snippets b/.vscode/shared.code-snippets
index 6d6690a0282..fb3df23dd42 100644
--- a/.vscode/shared.code-snippets
+++ b/.vscode/shared.code-snippets
@@ -23,11 +23,13 @@
"description": "Insert Copyright Statement"
},
"TS -> Inject Service": {
+ "scope": "typescript",
"description": "Constructor Injection Pattern",
"prefix": "@inject",
"body": "@$1 private readonly _$2: ${1},$0"
},
"TS -> Event & Emitter": {
+ "scope": "typescript",
"prefix": "emitter",
"description": "Add emitter and event properties",
"body": [
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 42366a1b720..89aba8e5fe0 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -30,15 +30,15 @@
},
{
"type": "npm",
- "script": "strict-null-check-watch",
- "label": "TS - Strict Null Checks",
+ "script": "strict-initialization-watch",
+ "label": "TS - Strict Initialization",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"problemMatcher": {
"base": "$tsc-watch",
- "owner": "typescript-strict-null",
+ "owner": "typescript-strict-initialization",
"applyTo": "allDocuments"
}
},
@@ -83,4 +83,4 @@
"problemMatcher": []
}
]
-}
+}
\ No newline at end of file
diff --git a/.yarnrc b/.yarnrc
index 8e1ac6b6cac..beab9f70b95 100644
--- a/.yarnrc
+++ b/.yarnrc
@@ -1,3 +1,3 @@
disturl "https://atom.io/download/electron"
-target "2.0.12"
+target "3.1.8"
runtime "electron"
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7775753e8bc..34703fae665 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -37,7 +37,6 @@ If you find your issue already exists, make relevant comments and add your [reac
* 👍 - upvote
* 👎 - downvote
-
If you cannot find an existing issue that describes your bug or feature, create a new issue using the guidelines below.
### Writing Good Bug Reports and Feature Requests
@@ -52,7 +51,9 @@ The built-in tool for reporting an issue, which you can access by using `Report
Please include the following with each issue:
-* Version of VS Code
+* Version of VS Code
+
+* Your operating system
* List of extensions that you have installed
diff --git a/README.md b/README.md
index a7294e71b9b..29b3270f1e5 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# Visual Studio Code - Open Source
-[](https://aka.ms/vscode-builds)
+
+[](https://dev.azure.com/vscode/VSCode/_build/latest?definitionId=12)
[](https://github.com/Microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc)
[](https://github.com/Microsoft/vscode/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3Abug)
[](https://gitter.im/Microsoft/vscode)
@@ -14,7 +15,7 @@ VS Code is updated monthly with new features and bug fixes. You can download it
-The [`vscode`](https://github.com/microsoft/vscode) repository is where VS Code is developed and there are many ways you can participate in the project, for example:
+The [`vscode`](https://github.com/microsoft/vscode) repository is where VS Code is developed and there are many ways in which you can participate in the project, for example:
* [Submit bugs and feature requests](https://github.com/microsoft/vscode/issues) and help us verify as they are checked in.
* Review [source code changes](https://github.com/microsoft/vscode/pulls).
diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt
index 757d3800253..69d9050d4a4 100644
--- a/ThirdPartyNotices.txt
+++ b/ThirdPartyNotices.txt
@@ -5,106 +5,70 @@ Do Not Translate or Localize
This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.
-1. atom/language-c (https://github.com/atom/language-c)
-2. atom/language-clojure (https://github.com/atom/language-clojure)
-3. atom/language-coffee-script (https://github.com/atom/language-coffee-script)
-4. atom/language-css (https://github.com/atom/language-css)
-5. atom/language-java (https://github.com/atom/language-java)
-6. atom/language-objective-c (https://github.com/atom/language-objective-c)
-7. atom/language-sass version 0.52.0 (https://github.com/atom/language-sass)
-8. atom/language-shellscript (https://github.com/atom/language-shellscript)
-9. atom/language-xml (https://github.com/atom/language-xml)
-10. chriskempson/tomorrow-theme (https://github.com/chriskempson/tomorrow-theme)
-11. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes)
-12. daaain/Handlebars (https://github.com/daaain/Handlebars)
-13. davidrios/pug-tmbundle (https://github.com/davidrios/pug-tmbundle)
-14. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped)
-15. demyte/language-cshtml (https://github.com/demyte/language-cshtml)
-16. Document Object Model ()
-17. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage)
-18. expand-abbreviation version 0.5.8 (https://github.com/emmetio/expand-abbreviation)
-19. fadeevab/make.tmbundle (https://github.com/fadeevab/make.tmbundle)
-20. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift)
-21. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/)
-22. Ikuyadeu/vscode-R (https://github.com/Ikuyadeu/vscode-R)
-23. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site)
-24. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar)
-25. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify)
-26. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert)
-27. language-docker (https://github.com/moby/moby)
-28. language-go version 0.39.0 (https://github.com/atom/language-go)
-29. language-less (https://github.com/atom/language-less)
-30. language-php (https://github.com/atom/language-php)
-31. language-rust version 0.4.9 (https://github.com/zargony/atom-language-rust)
-32. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython)
-33. marked version 0.5.0 (https://github.com/markedjs/marked)
-34. mdn-data version 1.1.12 (https://github.com/mdn/data)
-35. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage)
-36. Microsoft/vscode-JSON.tmLanguage (https://github.com/Microsoft/vscode-JSON.tmLanguage)
-37. Microsoft/vscode-mssql (https://github.com/Microsoft/vscode-mssql)
-38. mmims/language-batchfile (https://github.com/mmims/language-batchfile)
-39. octicons-code version 3.1.0 (https://octicons.github.com)
-40. octicons-font version 3.1.0 (https://octicons.github.com)
-41. PowerShell/EditorSyntax (https://github.com/powershell/editorsyntax)
-42. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui)
-43. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage)
-44. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle)
-45. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle)
-46. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle)
-47. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle)
-48. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle)
-49. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle)
-50. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle)
-51. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle)
-52. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle)
-53. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle)
-54. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle)
-55. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle)
-56. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle)
-57. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage)
-58. Unicode ()
-59. vscode-logfile-highlighter version 1.2.0 (https://github.com/emilast/vscode-logfile-highlighter)
-60. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift)
-61. Web Background Synchronization (https://github.com/WICG/BackgroundSync)
+1. atom/language-clojure version 0.22.6 (https://github.com/atom/language-clojure)
+2. atom/language-coffee-script version 0.49.3 (https://github.com/atom/language-coffee-script)
+3. atom/language-java version 0.31.1 (https://github.com/atom/language-java)
+4. atom/language-objective-c version 0.15.0 (https://github.com/atom/language-objective-c)
+5. atom/language-sass version 0.61.4 (https://github.com/atom/language-sass)
+6. atom/language-shellscript version 0.26.0 (https://github.com/atom/language-shellscript)
+7. atom/language-xml version 0.35.2 (https://github.com/atom/language-xml)
+8. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes)
+9. daaain/Handlebars version 1.7.1 (https://github.com/daaain/Handlebars)
+10. davidrios/pug-tmbundle (https://github.com/davidrios/pug-tmbundle)
+11. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped)
+12. demyte/language-cshtml version 0.3.0 (https://github.com/demyte/language-cshtml)
+13. Document Object Model version 4.0.0 (https://www.w3.org/DOM/)
+14. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage)
+15. expand-abbreviation version 0.5.8 (https://github.com/emmetio/expand-abbreviation)
+16. fadeevab/make.tmbundle (https://github.com/fadeevab/make.tmbundle)
+17. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift)
+18. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/)
+19. Ikuyadeu/vscode-R version 0.5.5 (https://github.com/Ikuyadeu/vscode-R)
+20. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site)
+21. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar)
+22. jeff-hykin/cpp-textmate-grammar version 1.8.8 (https://github.com/jeff-hykin/cpp-textmate-grammar)
+23. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify)
+24. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert)
+25. language-docker (https://github.com/moby/moby)
+26. language-go version 0.44.3 (https://github.com/atom/language-go)
+27. language-less version 0.34.2 (https://github.com/atom/language-less)
+28. language-php version 0.44.1 (https://github.com/atom/language-php)
+29. language-rust version 0.4.12 (https://github.com/zargony/atom-language-rust)
+30. MagicStack/MagicPython version 1.1.1 (https://github.com/MagicStack/MagicPython)
+31. marked version 0.6.2 (https://github.com/markedjs/marked)
+32. mdn-data version 1.1.12 (https://github.com/mdn/data)
+33. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage)
+34. Microsoft/vscode-JSON.tmLanguage (https://github.com/Microsoft/vscode-JSON.tmLanguage)
+35. Microsoft/vscode-mssql version 1.4.0 (https://github.com/Microsoft/vscode-mssql)
+36. mmims/language-batchfile version 0.7.5 (https://github.com/mmims/language-batchfile)
+37. octicons version 8.3.0 (https://github.com/primer/octicons)
+38. octref/language-css version 0.42.11 (https://github.com/octref/language-css)
+39. PowerShell/EditorSyntax (https://github.com/powershell/editorsyntax)
+40. promise-polyfill version 8.0.0 (https://github.com/taylorhakes/promise-polyfill)
+41. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui)
+42. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage)
+43. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle)
+44. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle)
+45. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle)
+46. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle)
+47. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle)
+48. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle)
+49. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle)
+50. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle)
+51. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle)
+52. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle)
+53. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle)
+54. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle)
+55. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle)
+56. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage)
+57. TypeScript-TmLanguage version 1.0.0 (https://github.com/Microsoft/TypeScript-TmLanguage)
+58. Unicode version 12.0.0 (http://www.unicode.org/)
+59. vscode-logfile-highlighter version 2.4.1 (https://github.com/emilast/vscode-logfile-highlighter)
+60. vscode-octicons-font version 1.1.0 (https://github.com/Microsoft/vscode-octicons-font)
+61. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift)
+62. Web Background Synchronization (https://github.com/WICG/BackgroundSync)
-%% atom/language-c NOTICES AND INFORMATION BEGIN HERE
-=========================================
-The MIT License (MIT)
-
-Copyright (c) 2014 GitHub Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-This package was derived from a TextMate bundle located at
-https://github.com/textmate/c.tmbundle and distributed under the following
-license, located in `README.mdown`:
-
-Permission to copy, use, modify, sell and distribute this
-software is granted. This software is provided "as is" without
-express or implied warranty, and with no claim as to its
-suitability for any purpose.
-=========================================
-END OF atom/language-c NOTICES AND INFORMATION
-
%% atom/language-clojure NOTICES AND INFORMATION BEGIN HERE
=========================================
Copyright (c) 2014 GitHub Inc.
@@ -212,43 +176,6 @@ OTHER DEALINGS IN THE SOFTWARE.
=========================================
END OF atom/language-coffee-script NOTICES AND INFORMATION
-%% atom/language-css NOTICES AND INFORMATION BEGIN HERE
-=========================================
-The MIT License (MIT)
-
-Copyright (c) 2014 GitHub Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-This package was derived from a TextMate bundle located at
-https://github.com/textmate/css.tmbundle and distributed under the following
-license, located in `README.mdown`:
-
-Permission to copy, use, modify, sell and distribute this
-software is granted. This software is provided "as is" without
-express or implied warranty, and with no claim as to its
-suitability for any purpose.
-=========================================
-END OF atom/language-css NOTICES AND INFORMATION
-
%% atom/language-java NOTICES AND INFORMATION BEGIN HERE
=========================================
The MIT License (MIT)
@@ -450,22 +377,6 @@ suitability for any purpose.
=========================================
END OF atom/language-xml NOTICES AND INFORMATION
-%% chriskempson/tomorrow-theme NOTICES AND INFORMATION BEGIN HERE
-=========================================
-The MIT License (MIT)
-
-Copyright (C) 2013 Chris Kempson
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-=========================================
-END OF chriskempson/tomorrow-theme NOTICES AND INFORMATION
-
%% Colorsublime-Themes NOTICES AND INFORMATION BEGIN HERE
=========================================
Copyright (c) 2015 Colorsublime.com
@@ -825,6 +736,32 @@ THE SOFTWARE.
=========================================
END OF ionide/ionide-fsgrammar NOTICES AND INFORMATION
+%% jeff-hykin/cpp-textmate-grammar NOTICES AND INFORMATION BEGIN HERE
+=========================================
+MIT License
+
+Copyright (c) 2019 Jeff Hykin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+=========================================
+END OF jeff-hykin/cpp-textmate-grammar NOTICES AND INFORMATION
+
%% js-beautify NOTICES AND INFORMATION BEGIN HERE
=========================================
The MIT License (MIT)
@@ -1800,11 +1737,11 @@ THE SOFTWARE.
=========================================
END OF mmims/language-batchfile NOTICES AND INFORMATION
-%% octicons-code NOTICES AND INFORMATION BEGIN HERE
+%% octicons NOTICES AND INFORMATION BEGIN HERE
=========================================
-The MIT License (MIT)
+MIT License
-(c) 2012-2015 GitHub
+Copyright (c) 2019 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -1813,109 +1750,55 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
=========================================
-END OF octicons-code NOTICES AND INFORMATION
+END OF octicons NOTICES AND INFORMATION
-%% octicons-font NOTICES AND INFORMATION BEGIN HERE
+%% octref/language-css NOTICES AND INFORMATION BEGIN HERE
=========================================
-(c) 2012-2015 GitHub
+The MIT License (MIT)
-SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+Copyright (c) 2014 GitHub Inc.
-PREAMBLE
-The goals of the Open Font License (OFL) are to stimulate worldwide
-development of collaborative font projects, to support the font creation
-efforts of academic and linguistic communities, and to provide a free and
-open framework in which fonts may be shared and improved in partnership
-with others.
-
-The OFL allows the licensed fonts to be used, studied, modified and
-redistributed freely as long as they are not sold by themselves. The
-fonts, including any derivative works, can be bundled, embedded,
-redistributed and/or sold with any software provided that any reserved
-names are not used by derivative works. The fonts and derivatives,
-however, cannot be released under any other type of license. The
-requirement for fonts to remain under this license does not apply
-to any document created using the fonts or their derivatives.
-
-DEFINITIONS
-"Font Software" refers to the set of files released by the Copyright
-Holder(s) under this license and clearly marked as such. This may
-include source files, build scripts and documentation.
-
-"Reserved Font Name" refers to any names specified as such after the
-copyright statement(s).
-
-"Original Version" refers to the collection of Font Software components as
-distributed by the Copyright Holder(s).
-
-"Modified Version" refers to any derivative made by adding to, deleting,
-or substituting -- in part or in whole -- any of the components of the
-Original Version, by changing formats or by porting the Font Software to a
-new environment.
-
-"Author" refers to any designer, engineer, programmer, technical
-writer or other person who contributed to the Font Software.
-
-PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
-a copy of the Font Software, to use, study, copy, merge, embed, modify,
-redistribute, and sell modified and unmodified copies of the Font
-Software, subject to the following conditions:
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
-1) Neither the Font Software nor any of its individual components,
-in Original or Modified Versions, may be sold by itself.
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
-2) Original or Modified Versions of the Font Software may be bundled,
-redistributed and/or sold with any software, provided that each copy
-contains the above copyright notice and this license. These can be
-included either as stand-alone text files, human-readable headers or
-in the appropriate machine-readable metadata fields within text or
-binary files as long as those fields can be easily viewed by the user.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-3) No Modified Version of the Font Software may use the Reserved Font
-Name(s) unless explicit written permission is granted by the corresponding
-Copyright Holder. This restriction only applies to the primary font name as
-presented to the users.
-4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
-Software shall not be used to promote, endorse or advertise any
-Modified Version, except to acknowledge the contribution(s) of the
-Copyright Holder(s) and the Author(s) or with their explicit written
-permission.
+This package was derived from a TextMate bundle located at
+https://github.com/textmate/css.tmbundle and distributed under the following
+license, located in `README.mdown`:
-5) The Font Software, modified or unmodified, in part or in whole,
-must be distributed entirely under this license, and must not be
-distributed under any other license. The requirement for fonts to
-remain under this license does not apply to any document created
-using the Font Software.
-
-TERMINATION
-This license becomes null and void if any of the above conditions are
-not met.
-
-DISCLAIMER
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
-DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
-OTHER DEALINGS IN THE FONT SOFTWARE.
+Permission to copy, use, modify, sell and distribute this
+software is granted. This software is provided "as is" without
+express or implied warranty, and with no claim as to its
+suitability for any purpose.
=========================================
-END OF octicons-font NOTICES AND INFORMATION
+END OF octref/language-css NOTICES AND INFORMATION
%% PowerShell/EditorSyntax NOTICES AND INFORMATION BEGIN HERE
=========================================
@@ -1945,6 +1828,33 @@ SOFTWARE.
=========================================
END OF PowerShell/EditorSyntax NOTICES AND INFORMATION
+%% promise-polyfill NOTICES AND INFORMATION BEGIN HERE
+=========================================
+The MIT License (MIT)
+
+Copyright (c) 2014 Taylor Hakes
+Copyright (c) 2014 Forbes Lindesay
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+=========================================
+END OF promise-polyfill NOTICES AND INFORMATION
+
%% seti-ui NOTICES AND INFORMATION BEGIN HERE
=========================================
Copyright (c) 2014 Jesse Weed
@@ -2357,6 +2267,32 @@ SOFTWARE.
=========================================
END OF vscode-logfile-highlighter NOTICES AND INFORMATION
+%% vscode-octicons-font NOTICES AND INFORMATION BEGIN HERE
+=========================================
+MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
+=========================================
+END OF vscode-octicons-font NOTICES AND INFORMATION
+
%% vscode-swift NOTICES AND INFORMATION BEGIN HERE
=========================================
The MIT License (MIT)
diff --git a/build/.nativeignore b/build/.nativeignore
new file mode 100644
index 00000000000..cc88ae0d878
--- /dev/null
+++ b/build/.nativeignore
@@ -0,0 +1,111 @@
+# cleanup rules for native node modules, .gitignore style
+
+fsevents/binding.gyp
+fsevents/fsevents.cc
+fsevents/build/**
+fsevents/src/**
+fsevents/test/**
+!fsevents/**/*.node
+
+vscode-sqlite3/binding.gyp
+vscode-sqlite3/benchmark/**
+vscode-sqlite3/cloudformation/**
+vscode-sqlite3/deps/**
+vscode-sqlite3/test/**
+vscode-sqlite3/build/**
+vscode-sqlite3/src/**
+!vscode-sqlite3/build/Release/*.node
+
+oniguruma/binding.gyp
+oniguruma/build/**
+oniguruma/src/**
+oniguruma/deps/**
+!oniguruma/build/Release/*.node
+!oniguruma/src/*.js
+
+windows-mutex/binding.gyp
+windows-mutex/build/**
+windows-mutex/src/**
+!windows-mutex/**/*.node
+
+native-keymap/binding.gyp
+native-keymap/build/**
+native-keymap/src/**
+native-keymap/deps/**
+!native-keymap/build/Release/*.node
+
+native-is-elevated/binding.gyp
+native-is-elevated/build/**
+native-is-elevated/src/**
+native-is-elevated/deps/**
+!native-is-elevated/build/Release/*.node
+
+native-watchdog/binding.gyp
+native-watchdog/build/**
+native-watchdog/src/**
+!native-watchdog/build/Release/*.node
+
+spdlog/binding.gyp
+spdlog/build/**
+spdlog/deps/**
+spdlog/src/**
+spdlog/test/**
+!spdlog/build/Release/*.node
+
+jschardet/dist/**
+
+windows-foreground-love/binding.gyp
+windows-foreground-love/build/**
+windows-foreground-love/src/**
+!windows-foreground-love/**/*.node
+
+windows-process-tree/binding.gyp
+windows-process-tree/build/**
+windows-process-tree/src/**
+!windows-process-tree/**/*.node
+
+gc-signals/binding.gyp
+gc-signals/build/**
+gc-signals/src/**
+gc-signals/deps/**
+
+!gc-signals/build/Release/*.node
+!gc-signals/src/index.js
+
+keytar/binding.gyp
+keytar/build/**
+keytar/src/**
+keytar/script/**
+keytar/node_modules/**
+!keytar/**/*.node
+
+node-pty/binding.gyp
+node-pty/build/**
+node-pty/src/**
+node-pty/tools/**
+!node-pty/build/Release/*.exe
+!node-pty/build/Release/*.dll
+!node-pty/build/Release/*.node
+
+vscode-nsfw/binding.gyp
+vscode-nsfw/build/**
+vscode-nsfw/src/**
+vscode-nsfw/openpa/**
+vscode-nsfw/includes/**
+!vscode-nsfw/build/Release/*.node
+!vscode-nsfw/**/*.a
+
+vsda/binding.gyp
+vsda/README.md
+vsda/build/**
+vsda/*.bat
+vsda/*.sh
+vsda/*.cpp
+vsda/*.h
+!vsda/build/Release/vsda.node
+
+vscode-windows-ca-certs/**/*
+!vscode-windows-ca-certs/package.json
+!vscode-windows-ca-certs/**/*.node
+
+node-addon-api/**/*
\ No newline at end of file
diff --git a/build/azure-pipelines/common/publish.ts b/build/azure-pipelines/common/publish.ts
index 2095c2d2532..724939da318 100644
--- a/build/azure-pipelines/common/publish.ts
+++ b/build/azure-pipelines/common/publish.ts
@@ -6,7 +6,6 @@
'use strict';
import * as fs from 'fs';
-import { execSync } from 'child_process';
import { Readable } from 'stream';
import * as crypto from 'crypto';
import * as azure from 'azure-storage';
@@ -65,7 +64,7 @@ interface Asset {
platform: string;
type: string;
url: string;
- mooncakeUrl: string;
+ mooncakeUrl?: string;
hash: string;
sha256hash: string;
size: number;
@@ -152,9 +151,13 @@ async function publish(commit: string, quality: string, platform: string, type:
const queuedBy = process.env['BUILD_QUEUEDBY']!;
const sourceBranch = process.env['BUILD_SOURCEBRANCH']!;
- const isReleased = quality === 'insider'
- && /^master$|^refs\/heads\/master$/.test(sourceBranch)
- && /Project Collection Service Accounts|Microsoft.VisualStudio.Services.TFS/.test(queuedBy);
+ const isReleased = (
+ // Insiders: nightly build from master
+ (quality === 'insider' && /^master$|^refs\/heads\/master$/.test(sourceBranch) && /Project Collection Service Accounts|Microsoft.VisualStudio.Services.TFS/.test(queuedBy)) ||
+
+ // Exploration: any build from electron-4.0.x branch
+ (quality === 'exploration' && /^electron-4.0.x$|^refs\/heads\/electron-4.0.x$/.test(sourceBranch))
+ );
console.log('Publishing...');
console.log('Quality:', quality);
@@ -184,40 +187,18 @@ async function publish(commit: string, quality: string, platform: string, type:
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
- const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY']!, `${storageAccount}.blob.core.chinacloudapi.cn`)
- .withFilter(new azure.ExponentialRetryPolicyFilter(20));
+ await assertContainer(blobService, quality);
- // mooncake is fussy and far away, this is needed!
- mooncakeBlobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000;
+ const blobExists = await doesAssetExist(blobService, quality, blobName);
- await Promise.all([
- assertContainer(blobService, quality),
- assertContainer(mooncakeBlobService, quality)
- ]);
-
- const [blobExists, moooncakeBlobExists] = await Promise.all([
- doesAssetExist(blobService, quality, blobName),
- doesAssetExist(mooncakeBlobService, quality, blobName)
- ]);
-
- const promises: Array> = [];
-
- if (!blobExists) {
- promises.push(uploadBlob(blobService, quality, blobName, file));
- }
-
- if (!moooncakeBlobExists) {
- promises.push(uploadBlob(mooncakeBlobService, quality, blobName, file));
- }
-
- if (promises.length === 0) {
+ if (blobExists) {
console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
return;
}
console.log('Uploading blobs to Azure storage...');
- await Promise.all(promises);
+ await uploadBlob(blobService, quality, blobName, file);
console.log('Blobs successfully uploaded.');
@@ -229,7 +210,6 @@ async function publish(commit: string, quality: string, platform: string, type:
platform: platform,
type: type,
url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`,
- mooncakeUrl: `${process.env['MOONCAKE_CDN_URL']}/${quality}/${blobName}`,
hash: sha1hash,
sha256hash,
size
@@ -270,12 +250,18 @@ function main(): void {
return;
}
+ const commit = process.env['BUILD_SOURCEVERSION'];
+
+ if (!commit) {
+ console.warn('Skipping publish due to missing BUILD_SOURCEVERSION');
+ return;
+ }
+
const opts = minimist(process.argv.slice(2), {
boolean: ['upload-only']
});
const [quality, platform, type, name, version, _isUpdate, file] = opts._;
- const commit = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim();
publish(commit, quality, platform, type, name, version, _isUpdate, file, opts).catch(err => {
console.error(err);
diff --git a/build/azure-pipelines/common/sync-mooncake.ts b/build/azure-pipelines/common/sync-mooncake.ts
new file mode 100644
index 00000000000..af0db530683
--- /dev/null
+++ b/build/azure-pipelines/common/sync-mooncake.ts
@@ -0,0 +1,176 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+'use strict';
+
+import * as url from 'url';
+import * as azure from 'azure-storage';
+import * as mime from 'mime';
+import { DocumentClient, RetrievedDocument } from 'documentdb';
+
+function log(...args: any[]) {
+ console.log(...[`[${new Date().toISOString()}]`, ...args]);
+}
+
+function error(...args: any[]) {
+ console.error(...[`[${new Date().toISOString()}]`, ...args]);
+}
+
+if (process.argv.length < 3) {
+ error('Usage: node sync-mooncake.js ');
+ process.exit(-1);
+}
+
+interface Build extends RetrievedDocument {
+ assets: Asset[];
+}
+
+interface Asset {
+ platform: string;
+ type: string;
+ url: string;
+ mooncakeUrl: string;
+ hash: string;
+ sha256hash: string;
+ size: number;
+ supportsFastUpdate?: boolean;
+}
+
+function updateBuild(commit: string, quality: string, platform: string, type: string, asset: Asset): Promise {
+ const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
+ const collection = 'dbs/builds/colls/' + quality;
+ const updateQuery = {
+ query: 'SELECT TOP 1 * FROM c WHERE c.id = @id',
+ parameters: [{ name: '@id', value: commit }]
+ };
+
+ let updateTries = 0;
+
+ function _update(): Promise {
+ updateTries++;
+
+ return new Promise((c, e) => {
+ client.queryDocuments(collection, updateQuery).toArray((err, results) => {
+ if (err) { return e(err); }
+ if (results.length !== 1) { return e(new Error('No documents')); }
+
+ const release = results[0];
+
+ release.assets = [
+ ...release.assets.filter((a: any) => !(a.platform === platform && a.type === type)),
+ asset
+ ];
+
+ client.replaceDocument(release._self, release, err => {
+ if (err && err.code === 409 && updateTries < 5) { return c(_update()); }
+ if (err) { return e(err); }
+
+ log('Build successfully updated.');
+ c();
+ });
+ });
+ });
+ }
+
+ return _update();
+}
+
+async function sync(commit: string, quality: string): Promise {
+ log(`Synchronizing Mooncake assets for ${quality}, ${commit}...`);
+
+ const cosmosdb = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
+ const collection = `dbs/builds/colls/${quality}`;
+ const query = {
+ query: 'SELECT TOP 1 * FROM c WHERE c.id = @id',
+ parameters: [{ name: '@id', value: commit }]
+ };
+
+ const build = await new Promise((c, e) => {
+ cosmosdb.queryDocuments(collection, query).toArray((err, results) => {
+ if (err) { return e(err); }
+ if (results.length !== 1) { return e(new Error('No documents')); }
+ c(results[0] as Build);
+ });
+ });
+
+ log(`Found build for ${commit}, with ${build.assets.length} assets`);
+
+ const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']!;
+
+ const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
+ .withFilter(new azure.ExponentialRetryPolicyFilter(20));
+
+ const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY']!, `${storageAccount}.blob.core.chinacloudapi.cn`)
+ .withFilter(new azure.ExponentialRetryPolicyFilter(20));
+
+ // mooncake is fussy and far away, this is needed!
+ blobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000;
+ mooncakeBlobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000;
+
+ for (const asset of build.assets) {
+ try {
+ const blobPath = url.parse(asset.url).path;
+
+ if (!blobPath) {
+ throw new Error(`Failed to parse URL: ${asset.url}`);
+ }
+
+ const blobName = blobPath.replace(/^\/\w+\//, '');
+
+ log(`Found ${blobName}`);
+
+ if (asset.mooncakeUrl) {
+ log(` Already in Mooncake ✔️`);
+ continue;
+ }
+
+ const readStream = blobService.createReadStream(quality, blobName, undefined!);
+ const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = {
+ contentSettings: {
+ contentType: mime.lookup(blobPath),
+ cacheControl: 'max-age=31536000, public'
+ }
+ };
+
+ const writeStream = mooncakeBlobService.createWriteStreamToBlockBlob(quality, blobName, blobOptions, undefined);
+
+ log(` Uploading to Mooncake...`);
+ await new Promise((c, e) => readStream.pipe(writeStream).on('finish', c).on('error', e));
+
+ log(` Updating build in DB...`);
+ asset.mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`;
+ await updateBuild(commit, quality, asset.platform, asset.type, asset);
+
+ log(` Done ✔️`);
+ } catch (err) {
+ error(err);
+ }
+ }
+
+ log(`All done ✔️`);
+}
+
+function main(): void {
+ if (process.env['VSCODE_BUILD_SKIP_PUBLISH']) {
+ error('Skipping publish due to VSCODE_BUILD_SKIP_PUBLISH');
+ return;
+ }
+
+ const commit = process.env['BUILD_SOURCEVERSION'];
+
+ if (!commit) {
+ error('Skipping publish due to missing BUILD_SOURCEVERSION');
+ return;
+ }
+
+ const quality = process.argv[2];
+
+ sync(commit, quality).catch(err => {
+ error(err);
+ process.exit(1);
+ });
+}
+
+main();
diff --git a/build/azure-pipelines/darwin/build.sh b/build/azure-pipelines/darwin/build.sh
new file mode 100755
index 00000000000..af558b8c145
--- /dev/null
+++ b/build/azure-pipelines/darwin/build.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+set -e
+yarn gulp vscode-darwin-min
+yarn gulp upload-vscode-sourcemaps
\ No newline at end of file
diff --git a/build/azure-pipelines/darwin/continuous-build-darwin.yml b/build/azure-pipelines/darwin/continuous-build-darwin.yml
index 99e17e940a6..776c1172bea 100644
--- a/build/azure-pipelines/darwin/continuous-build-darwin.yml
+++ b/build/azure-pipelines/darwin/continuous-build-darwin.yml
@@ -1,13 +1,25 @@
steps:
- task: NodeTool@0
inputs:
- versionSpec: "8.12.0"
+ versionSpec: "10.15.1"
+- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
+ inputs:
+ keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
+ targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
+ vstsFeed: '$(ArtifactFeed)'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.10.1"
- script: |
yarn
displayName: Install Dependencies
+ condition: ne(variables['CacheRestored'], 'true')
+- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
+ inputs:
+ keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
+ targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
+ vstsFeed: '$(ArtifactFeed)'
+ condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- script: |
yarn gulp electron-x64
displayName: Download Electron
@@ -17,9 +29,6 @@ steps:
- script: |
yarn monaco-compile-check
displayName: Run Monaco Editor Checks
-- script: |
- yarn strict-null-check
- displayName: Run Strict Null Checks
- script: |
yarn compile
displayName: Compile Sources
diff --git a/build/azure-pipelines/darwin/product-build-darwin.yml b/build/azure-pipelines/darwin/product-build-darwin.yml
index c510636efc9..5d6ec8c2cff 100644
--- a/build/azure-pipelines/darwin/product-build-darwin.yml
+++ b/build/azure-pipelines/darwin/product-build-darwin.yml
@@ -1,29 +1,48 @@
steps:
- task: NodeTool@0
inputs:
- versionSpec: "8.12.0"
+ versionSpec: "10.15.1"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.10.1"
+- task: AzureKeyVault@1
+ displayName: 'Azure Key Vault: Get Secrets'
+ inputs:
+ azureSubscription: 'vscode-builds-subscription'
+ KeyVaultName: vscode
+
- script: |
set -e
- echo "machine monacotools.visualstudio.com password $(VSO_PAT)" > ~/.netrc
+
+ cat << EOF > ~/.netrc
+ machine monacotools.visualstudio.com
+ password $(devops-pat)
+ machine github.com
+ login vscode
+ password $(github-distro-mixin-password)
+ EOF
+
+ git config user.email "vscode@microsoft.com"
+ git config user.name "VSCode"
+ git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
+ git fetch distro
+ git merge $(node -p "require('./package.json').distro")
+
yarn
- yarn gulp -- hygiene
+ yarn gulp mixin
+ yarn gulp hygiene
yarn monaco-compile-check
- yarn strict-null-check
- VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" yarn gulp -- mixin
node build/azure-pipelines/common/installDistro.js
node build/lib/builtInExtensions.js
displayName: Prepare build
- script: |
set -e
- VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" \
- AZURE_STORAGE_ACCESS_KEY="$(AZURE_STORAGE_ACCESS_KEY)" \
- yarn gulp -- vscode-darwin-min upload-vscode-sourcemaps
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
+ ./build/azure-pipelines/darwin/build.sh
displayName: Build
- script: |
@@ -33,6 +52,11 @@ steps:
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-darwin/$APP_NAME"
displayName: Run unit tests
+- script: |
+ set -e
+ ./scripts/test-integration.sh --build --tfs "Integration Tests"
+ displayName: Run integration tests
+
- script: |
set -e
pushd ../VSCode-darwin && zip -r -X -y ../VSCode-darwin.zip * && popd
@@ -59,32 +83,14 @@ steps:
- script: |
set -e
-
- # remove pkg from archive
- zip -d ../VSCode-darwin.zip "*.pkg"
-
- # publish the build
- PACKAGEJSON=`ls ../VSCode-darwin/*.app/Contents/Resources/app/package.json`
- VERSION=`node -p "require(\"$PACKAGEJSON\").version"`
- AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
- AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
- MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
- node build/azure-pipelines/common/publish.js \
- "$(VSCODE_QUALITY)" \
- darwin \
- archive \
- "VSCode-darwin-$(VSCODE_QUALITY).zip" \
- $VERSION \
- true \
- ../VSCode-darwin.zip
-
- # publish hockeyapp symbols
- node build/azure-pipelines/common/symbols.js "$(VSCODE_MIXIN_PASSWORD)" "$(VSCODE_HOCKEYAPP_TOKEN)" "$(VSCODE_ARCH)" "$(VSCODE_HOCKEYAPP_ID_MACOS)"
-
- # upload configuration
- AZURE_STORAGE_ACCESS_KEY="$(AZURE_STORAGE_ACCESS_KEY)" \
- yarn gulp -- upload-vscode-configuration
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
+ AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
+ AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
+ VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
+ ./build/azure-pipelines/darwin/publish.sh
displayName: Publish
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
+ continueOnError: true
diff --git a/build/azure-pipelines/darwin/publish.sh b/build/azure-pipelines/darwin/publish.sh
new file mode 100755
index 00000000000..96d5967ea4b
--- /dev/null
+++ b/build/azure-pipelines/darwin/publish.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+# remove pkg from archive
+zip -d ../VSCode-darwin.zip "*.pkg"
+
+# publish the build
+PACKAGEJSON=`ls ../VSCode-darwin/*.app/Contents/Resources/app/package.json`
+VERSION=`node -p "require(\"$PACKAGEJSON\").version"`
+node build/azure-pipelines/common/publish.js \
+ "$VSCODE_QUALITY" \
+ darwin \
+ archive \
+ "VSCode-darwin-$VSCODE_QUALITY.zip" \
+ $VERSION \
+ true \
+ ../VSCode-darwin.zip
+
+# publish hockeyapp symbols
+node build/azure-pipelines/common/symbols.js "$VSCODE_MIXIN_PASSWORD" "$VSCODE_HOCKEYAPP_TOKEN" "$VSCODE_ARCH" "$VSCODE_HOCKEYAPP_ID_MACOS"
+
+# upload configuration
+yarn gulp upload-vscode-configuration
diff --git a/build/azure-pipelines/distro-build.yml b/build/azure-pipelines/distro-build.yml
new file mode 100644
index 00000000000..639456ad4ce
--- /dev/null
+++ b/build/azure-pipelines/distro-build.yml
@@ -0,0 +1,36 @@
+trigger:
+ branches:
+ include: ['master', 'release/*']
+pr:
+ branches:
+ include: ['master', 'release/*']
+
+steps:
+- task: NodeTool@0
+ inputs:
+ versionSpec: "10.15.1"
+
+- task: AzureKeyVault@1
+ displayName: 'Azure Key Vault: Get Secrets'
+ inputs:
+ azureSubscription: 'vscode-builds-subscription'
+ KeyVaultName: vscode
+
+- script: |
+ set -e
+
+ cat << EOF > ~/.netrc
+ machine github.com
+ login vscode
+ password $(github-distro-mixin-password)
+ EOF
+
+ git config user.email "vscode@microsoft.com"
+ git config user.name "VSCode"
+
+ git remote add distro "https://github.com/$VSCODE_MIXIN_REPO.git"
+ git fetch distro
+ git push distro origin/master:refs/heads/master
+ git merge $(node -p "require('./package.json').distro")
+
+ displayName: Sync & Merge Distro
\ No newline at end of file
diff --git a/build/azure-pipelines/linux/build.sh b/build/azure-pipelines/linux/build.sh
new file mode 100755
index 00000000000..bd251ebc789
--- /dev/null
+++ b/build/azure-pipelines/linux/build.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+set -e
+yarn gulp "vscode-linux-$VSCODE_ARCH-min"
\ No newline at end of file
diff --git a/build/azure-pipelines/linux/continuous-build-linux.yml b/build/azure-pipelines/linux/continuous-build-linux.yml
index 91891e6da94..ee47a8d4320 100644
--- a/build/azure-pipelines/linux/continuous-build-linux.yml
+++ b/build/azure-pipelines/linux/continuous-build-linux.yml
@@ -2,20 +2,32 @@ steps:
- script: |
set -e
sudo apt-get update
- sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 libgconf-2-4 dbus xvfb libgtk-3-0
+ sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
sudo service xvfb start
- task: NodeTool@0
inputs:
- versionSpec: "8.12.0"
+ versionSpec: "10.15.1"
+- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
+ inputs:
+ keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
+ targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
+ vstsFeed: '$(ArtifactFeed)'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.10.1"
- script: |
yarn
displayName: Install Dependencies
+ condition: ne(variables['CacheRestored'], 'true')
+- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
+ inputs:
+ keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
+ targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
+ vstsFeed: '$(ArtifactFeed)'
+ condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- script: |
yarn gulp electron-x64
displayName: Download Electron
@@ -25,9 +37,6 @@ steps:
- script: |
yarn monaco-compile-check
displayName: Run Monaco Editor Checks
-- script: |
- yarn strict-null-check
- displayName: Run Strict Null Checks
- script: |
yarn compile
displayName: Compile Sources
diff --git a/build/azure-pipelines/linux/product-build-linux.yml b/build/azure-pipelines/linux/product-build-linux.yml
index ff877d440b7..f727e30d252 100644
--- a/build/azure-pipelines/linux/product-build-linux.yml
+++ b/build/azure-pipelines/linux/product-build-linux.yml
@@ -1,12 +1,18 @@
steps:
- task: NodeTool@0
inputs:
- versionSpec: "8.12.0"
+ versionSpec: "10.15.1"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.10.1"
+- task: AzureKeyVault@1
+ displayName: 'Azure Key Vault: Get Secrets'
+ inputs:
+ azureSubscription: 'vscode-builds-subscription'
+ KeyVaultName: vscode
+
- script: |
set -e
export npm_config_arch="$(VSCODE_ARCH)"
@@ -14,95 +20,57 @@ steps:
export PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig"
fi
- echo "machine monacotools.visualstudio.com password $(VSO_PAT)" > ~/.netrc
+ cat << EOF > ~/.netrc
+ machine monacotools.visualstudio.com
+ password $(devops-pat)
+ machine github.com
+ login vscode
+ password $(github-distro-mixin-password)
+ EOF
+
+ git config user.email "vscode@microsoft.com"
+ git config user.name "VSCode"
+ git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
+ git fetch distro
+ git merge $(node -p "require('./package.json').distro")
+
CHILD_CONCURRENCY=1 yarn
- npm run gulp -- hygiene
- npm run monaco-compile-check
- npm run strict-null-check
- VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin
+ yarn gulp mixin
+ yarn gulp hygiene
+ yarn monaco-compile-check
node build/azure-pipelines/common/installDistro.js
node build/lib/builtInExtensions.js
+ displayName: Prepare build
- script: |
set -e
- VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- vscode-linux-$(VSCODE_ARCH)-min
- name: build
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ ./build/azure-pipelines/linux/build.sh
+ displayName: Build
- script: |
set -e
- npm run gulp -- "electron-$(VSCODE_ARCH)"
+ yarn gulp "electron-$(VSCODE_ARCH)"
# xvfb seems to be crashing often, let's make sure it's always up
service xvfb start
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests"
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
- name: test
+ displayName: Run unit tests
- script: |
set -e
- REPO="$(pwd)"
- ROOT="$REPO/.."
- ARCH="$(VSCODE_ARCH)"
-
- # Publish tarball
- PLATFORM_LINUX="linux-$(VSCODE_ARCH)"
- [[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
- [[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
- BUILDNAME="VSCode-$PLATFORM_LINUX"
- BUILD="$ROOT/$BUILDNAME"
- BUILD_VERSION="$(date +%s)"
- [ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz"
- TARBALL_PATH="$ROOT/$TARBALL_FILENAME"
- PACKAGEJSON="$BUILD/resources/app/package.json"
- VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
-
- rm -rf $ROOT/code-*.tar.*
- (cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME)
-
- AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
- AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
- MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
- node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_LINUX" archive-unsigned "$TARBALL_FILENAME" "$VERSION" true "$TARBALL_PATH"
-
- # Publish hockeyapp symbols
- node build/azure-pipelines/common/symbols.js "$(VSCODE_MIXIN_PASSWORD)" "$(VSCODE_HOCKEYAPP_TOKEN)" "$(VSCODE_ARCH)" "$(VSCODE_HOCKEYAPP_ID_LINUX64)"
-
- # Publish DEB
- npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-build-deb"
- PLATFORM_DEB="linux-deb-$ARCH"
- [[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
- DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)"
- DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME"
-
- AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
- AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
- MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
- node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_DEB" package "$DEB_FILENAME" "$VERSION" true "$DEB_PATH"
-
- # Publish RPM
- npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-build-rpm"
- PLATFORM_RPM="linux-rpm-$ARCH"
- [[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
- RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)"
- RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME"
-
- AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
- AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
- MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
- node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_RPM" package "$RPM_FILENAME" "$VERSION" true "$RPM_PATH"
-
- # Publish Snap
- npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-prepare-snap"
-
- # Pack snap tarball artifact, in order to preserve file perms
- mkdir -p $REPO/.build/linux/snap-tarball
- SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-$(VSCODE_ARCH).tar.gz"
- rm -rf $SNAP_TARBALL_PATH
- (cd .build/linux && tar -czf $SNAP_TARBALL_PATH snap)
+ AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
+ AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
+ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
+ VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
+ ./build/azure-pipelines/linux/publish.sh
+ displayName: Publish
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
+ continueOnError: true
- task: PublishPipelineArtifact@0
displayName: 'Publish Pipeline Artifact'
diff --git a/build/azure-pipelines/linux/publish.sh b/build/azure-pipelines/linux/publish.sh
new file mode 100755
index 00000000000..ca338a6fc5f
--- /dev/null
+++ b/build/azure-pipelines/linux/publish.sh
@@ -0,0 +1,51 @@
+#!/usr/bin/env bash
+set -e
+REPO="$(pwd)"
+ROOT="$REPO/.."
+
+# Publish tarball
+PLATFORM_LINUX="linux-$VSCODE_ARCH"
+[[ "$VSCODE_ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
+[[ "$VSCODE_ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
+BUILDNAME="VSCode-$PLATFORM_LINUX"
+BUILD="$ROOT/$BUILDNAME"
+BUILD_VERSION="$(date +%s)"
+[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz"
+TARBALL_PATH="$ROOT/$TARBALL_FILENAME"
+PACKAGEJSON="$BUILD/resources/app/package.json"
+VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
+
+rm -rf $ROOT/code-*.tar.*
+(cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME)
+
+node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_LINUX" archive-unsigned "$TARBALL_FILENAME" "$VERSION" true "$TARBALL_PATH"
+
+# Publish hockeyapp symbols
+node build/azure-pipelines/common/symbols.js "$VSCODE_MIXIN_PASSWORD" "$VSCODE_HOCKEYAPP_TOKEN" "$VSCODE_ARCH" "$VSCODE_HOCKEYAPP_ID_LINUX64"
+
+# Publish DEB
+yarn gulp "vscode-linux-$VSCODE_ARCH-build-deb"
+PLATFORM_DEB="linux-deb-$VSCODE_ARCH"
+[[ "$VSCODE_ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
+DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)"
+DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME"
+
+node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_DEB" package "$DEB_FILENAME" "$VERSION" true "$DEB_PATH"
+
+# Publish RPM
+yarn gulp "vscode-linux-$VSCODE_ARCH-build-rpm"
+PLATFORM_RPM="linux-rpm-$VSCODE_ARCH"
+[[ "$VSCODE_ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
+RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)"
+RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME"
+
+node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_RPM" package "$RPM_FILENAME" "$VERSION" true "$RPM_PATH"
+
+# Publish Snap
+yarn gulp "vscode-linux-$VSCODE_ARCH-prepare-snap"
+
+# Pack snap tarball artifact, in order to preserve file perms
+mkdir -p $REPO/.build/linux/snap-tarball
+SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-$VSCODE_ARCH.tar.gz"
+rm -rf $SNAP_TARBALL_PATH
+(cd .build/linux && tar -czf $SNAP_TARBALL_PATH snap)
diff --git a/build/azure-pipelines/linux/snap-build-linux.yml b/build/azure-pipelines/linux/snap-build-linux.yml
index 29252107f46..9d98e9fa472 100644
--- a/build/azure-pipelines/linux/snap-build-linux.yml
+++ b/build/azure-pipelines/linux/snap-build-linux.yml
@@ -1,12 +1,18 @@
steps:
- task: NodeTool@0
inputs:
- versionSpec: "8.12.0"
+ versionSpec: "10.15.1"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.10.1"
+- task: AzureKeyVault@1
+ displayName: 'Azure Key Vault: Get Secrets'
+ inputs:
+ azureSubscription: 'vscode-builds-subscription'
+ KeyVaultName: vscode
+
- task: DownloadPipelineArtifact@0
displayName: 'Download Pipeline Artifact'
inputs:
@@ -16,6 +22,14 @@ steps:
- script: |
set -e
+ # Get snapcraft version
+ snapcraft --version
+
+ # Make sure we get latest packages
+ sudo apt-get update
+ sudo apt-get upgrade -y
+
+ # Define variables
REPO="$(pwd)"
ARCH="$(VSCODE_ARCH)"
SNAP_ROOT="$REPO/.build/linux/snap/$ARCH"
@@ -33,10 +47,9 @@ steps:
PACKAGEJSON="$(ls $SNAP_ROOT/code*/usr/share/code*/resources/app/package.json)"
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
SNAP_PATH="$SNAP_ROOT/$SNAP_FILENAME"
- (cd $SNAP_ROOT/code-* && snapcraft snap --output "$SNAP_PATH")
+ (cd $SNAP_ROOT/code-* && sudo snapcraft snap --output "$SNAP_PATH")
# Publish snap package
- AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
- AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
- MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
+ AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
+ AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "linux-snap-$ARCH" package "$SNAP_FILENAME" "$VERSION" true "$SNAP_PATH"
\ No newline at end of file
diff --git a/build/azure-pipelines/product-build.yml b/build/azure-pipelines/product-build.yml
index afebc973ccc..c8bedfbffc0 100644
--- a/build/azure-pipelines/product-build.yml
+++ b/build/azure-pipelines/product-build.yml
@@ -1,9 +1,11 @@
resources:
containers:
- container: vscode-x64
- image: joaomoreno/vscode-linux-build-agent:x64
+ endpoint: VSCodeHub
+ image: vscodehub.azurecr.io/vscode-linux-build-agent:x64
- container: vscode-ia32
- image: joaomoreno/vscode-linux-build-agent:ia32
+ endpoint: VSCodeHub
+ image: vscodehub.azurecr.io/vscode-linux-build-agent:ia32
- container: snapcraft
image: snapcore/snapcraft
@@ -62,4 +64,18 @@ jobs:
pool:
vmImage: macOS 10.13
steps:
- - template: darwin/product-build-darwin.yml
\ No newline at end of file
+ - template: darwin/product-build-darwin.yml
+
+- job: Mooncake
+ pool:
+ vmImage: 'Ubuntu-16.04'
+ condition: true
+ dependsOn:
+ - Windows
+ - Windows32
+ - Linux
+ - LinuxSnap
+ - Linux32
+ - macOS
+ steps:
+ - template: sync-mooncake.yml
\ No newline at end of file
diff --git a/build/azure-pipelines/sync-mooncake.yml b/build/azure-pipelines/sync-mooncake.yml
new file mode 100644
index 00000000000..f3e8bc07856
--- /dev/null
+++ b/build/azure-pipelines/sync-mooncake.yml
@@ -0,0 +1,24 @@
+steps:
+- task: NodeTool@0
+ inputs:
+ versionSpec: "10.15.1"
+
+- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
+ inputs:
+ versionSpec: "1.10.1"
+
+- task: AzureKeyVault@1
+ displayName: 'Azure Key Vault: Get Secrets'
+ inputs:
+ azureSubscription: 'vscode-builds-subscription'
+ KeyVaultName: vscode
+
+- script: |
+ set -e
+
+ (cd build ; yarn)
+
+ AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
+ AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
+ MOONCAKE_STORAGE_ACCESS_KEY="$(vscode-mooncake-storage-key)" \
+ node build/azure-pipelines/common/sync-mooncake.js "$VSCODE_QUALITY"
diff --git a/build/azure-pipelines/win32/build.ps1 b/build/azure-pipelines/win32/build.ps1
new file mode 100644
index 00000000000..60325ba54ca
--- /dev/null
+++ b/build/azure-pipelines/win32/build.ps1
@@ -0,0 +1,4 @@
+. build/azure-pipelines/win32/exec.ps1
+$ErrorActionPreference = "Stop"
+exec { yarn gulp "vscode-win32-$env:VSCODE_ARCH-min" }
+exec { yarn gulp "vscode-win32-$env:VSCODE_ARCH-inno-updater" }
\ No newline at end of file
diff --git a/build/azure-pipelines/win32/continuous-build-win32.yml b/build/azure-pipelines/win32/continuous-build-win32.yml
index 7145e67e2ad..36336276814 100644
--- a/build/azure-pipelines/win32/continuous-build-win32.yml
+++ b/build/azure-pipelines/win32/continuous-build-win32.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
- versionSpec: "8.12.0"
+ versionSpec: "10.15.1"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.10.1"
@@ -9,9 +9,21 @@ steps:
inputs:
versionSpec: '2.x'
addToPath: true
+- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
+ inputs:
+ keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
+ targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
+ vstsFeed: '$(ArtifactFeed)'
- powershell: |
yarn
displayName: Install Dependencies
+ condition: ne(variables['CacheRestored'], 'true')
+- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
+ inputs:
+ keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
+ targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
+ vstsFeed: '$(ArtifactFeed)'
+ condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- powershell: |
yarn gulp electron
displayName: Download Electron
@@ -21,9 +33,6 @@ steps:
- powershell: |
yarn monaco-compile-check
displayName: Run Monaco Editor Checks
-- script: |
- yarn strict-null-check
- displayName: Run Strict Null Checks
- powershell: |
yarn compile
displayName: Compile Sources
diff --git a/build/azure-pipelines/win32/product-build-win32.yml b/build/azure-pipelines/win32/product-build-win32.yml
index c4922708cbd..8a6a6abb658 100644
--- a/build/azure-pipelines/win32/product-build-win32.yml
+++ b/build/azure-pipelines/win32/product-build-win32.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
- versionSpec: "8.12.0"
+ versionSpec: "10.15.1"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
@@ -12,41 +12,59 @@ steps:
versionSpec: '2.x'
addToPath: true
+- task: AzureKeyVault@1
+ displayName: 'Azure Key Vault: Get Secrets'
+ inputs:
+ azureSubscription: 'vscode-builds-subscription'
+ KeyVaultName: vscode
+
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
- "machine monacotools.visualstudio.com password $(VSO_PAT)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
+ "machine monacotools.visualstudio.com`npassword $(devops-pat)`nmachine github.com`nlogin vscode`npassword $(github-distro-mixin-password)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
$env:npm_config_arch="$(VSCODE_ARCH)"
$env:CHILD_CONCURRENCY="1"
- $env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)"
+
+ exec { git config user.email "vscode@microsoft.com" }
+ exec { git config user.name "VSCode" }
+ exec { git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git" }
+ exec { git fetch distro }
+ exec { git merge $(node -p "require('./package.json').distro") }
+
exec { yarn }
- exec { npm run gulp -- hygiene }
- exec { npm run monaco-compile-check }
- exec { npm run strict-null-check }
- exec { npm run gulp -- mixin }
+ exec { yarn gulp mixin }
+ exec { yarn gulp hygiene }
+ exec { yarn monaco-compile-check }
exec { node build/azure-pipelines/common/installDistro.js }
exec { node build/lib/builtInExtensions.js }
+ displayName: Prepare build
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
- $env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)"
- exec { npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-min" }
- exec { npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-inno-updater" }
- name: build
+ $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
+ .\build\azure-pipelines\win32\build.ps1
+ displayName: Build
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
- exec { npm run gulp -- "electron-$(VSCODE_ARCH)" }
+ exec { yarn gulp "electron-$(VSCODE_ARCH)" }
exec { .\scripts\test.bat --build --tfs "Unit Tests" }
# yarn smoketest -- --build "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
- name: test
+ displayName: Run unit tests
+
+- powershell: |
+ . build/azure-pipelines/win32/exec.ps1
+ $ErrorActionPreference = "Stop"
+ exec { yarn gulp "electron-$(VSCODE_ARCH)" }
+ exec { .\scripts\test-integration.bat --build --tfs "Integration Tests" }
+ displayName: Run integration tests
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
inputs:
ConnectedServiceName: 'ESRP CodeSign'
- FolderPath: '$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)'
+ FolderPath: '$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH),$(agent.builddirectory)/vscode-reh-win32-$(VSCODE_ARCH)'
Pattern: '*.dll,*.exe,*.node'
signConfigType: inlineSignParams
inlineOperation: |
@@ -114,38 +132,18 @@ steps:
- powershell: |
$ErrorActionPreference = "Stop"
- .\build\azure-pipelines\win32\import-esrp-auth-cert.ps1 -AuthCertificateBase64 $(ESRP_AUTH_CERTIFICATE) -AuthCertificateKey $(ESRP_AUTH_CERTIFICATE_KEY)
+ .\build\azure-pipelines\win32\import-esrp-auth-cert.ps1 -AuthCertificateBase64 $(esrp-auth-certificate) -AuthCertificateKey $(esrp-auth-certificate-key)
displayName: Import ESRP Auth Certificate
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
- exec { npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-archive" "vscode-win32-$(VSCODE_ARCH)-system-setup" "vscode-win32-$(VSCODE_ARCH)-user-setup" --sign }
-
- $Repo = "$(pwd)"
- $Root = "$Repo\.."
- $SystemExe = "$Repo\.build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup.exe"
- $UserExe = "$Repo\.build\win32-$(VSCODE_ARCH)\user-setup\VSCodeSetup.exe"
- $Zip = "$Repo\.build\win32-$(VSCODE_ARCH)\archive\VSCode-win32-$(VSCODE_ARCH).zip"
- $Build = "$Root\VSCode-win32-$(VSCODE_ARCH)"
-
- # get version
- $PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json
- $Version = $PackageJson.version
- $Quality = "$env:VSCODE_QUALITY"
- $env:AZURE_STORAGE_ACCESS_KEY_2 = "$(AZURE_STORAGE_ACCESS_KEY_2)"
- $env:MOONCAKE_STORAGE_ACCESS_KEY = "$(MOONCAKE_STORAGE_ACCESS_KEY)"
- $env:AZURE_DOCUMENTDB_MASTERKEY = "$(AZURE_DOCUMENTDB_MASTERKEY)"
-
- $assetPlatform = if ("$(VSCODE_ARCH)" -eq "ia32") { "win32" } else { "win32-x64" }
-
- exec { node build/azure-pipelines/common/publish.js $Quality "$global:assetPlatform-archive" archive "VSCode-win32-$(VSCODE_ARCH)-$Version.zip" $Version true $Zip }
- exec { node build/azure-pipelines/common/publish.js $Quality "$global:assetPlatform" setup "VSCodeSetup-$(VSCODE_ARCH)-$Version.exe" $Version true $SystemExe }
- exec { node build/azure-pipelines/common/publish.js $Quality "$global:assetPlatform-user" setup "VSCodeUserSetup-$(VSCODE_ARCH)-$Version.exe" $Version true $UserExe }
-
- # publish hockeyapp symbols
- $hockeyAppId = if ("$(VSCODE_ARCH)" -eq "ia32") { "$(VSCODE_HOCKEYAPP_ID_WIN32)" } else { "$(VSCODE_HOCKEYAPP_ID_WIN64)" }
- exec { node build/azure-pipelines/common/symbols.js "$(VSCODE_MIXIN_PASSWORD)" "$(VSCODE_HOCKEYAPP_TOKEN)" "$(VSCODE_ARCH)" $hockeyAppId }
+ $env:AZURE_STORAGE_ACCESS_KEY_2 = "$(vscode-storage-key)"
+ $env:AZURE_DOCUMENTDB_MASTERKEY = "$(builds-docdb-key-readwrite)"
+ $env:VSCODE_HOCKEYAPP_TOKEN = "$(vscode-hockeyapp-token)"
+ .\build\azure-pipelines\win32\publish.ps1
+ displayName: Publish
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
+ continueOnError: true
diff --git a/build/azure-pipelines/win32/publish.ps1 b/build/azure-pipelines/win32/publish.ps1
new file mode 100644
index 00000000000..8e6fa988adf
--- /dev/null
+++ b/build/azure-pipelines/win32/publish.ps1
@@ -0,0 +1,28 @@
+. build/azure-pipelines/win32/exec.ps1
+$ErrorActionPreference = "Stop"
+
+$Arch = "$env:VSCODE_ARCH"
+
+exec { yarn gulp "vscode-win32-$Arch-archive" "vscode-win32-$Arch-system-setup" "vscode-win32-$Arch-user-setup" --sign }
+
+$Repo = "$(pwd)"
+$Root = "$Repo\.."
+$SystemExe = "$Repo\.build\win32-$Arch\system-setup\VSCodeSetup.exe"
+$UserExe = "$Repo\.build\win32-$Arch\user-setup\VSCodeSetup.exe"
+$Zip = "$Repo\.build\win32-$Arch\archive\VSCode-win32-$Arch.zip"
+$Build = "$Root\VSCode-win32-$Arch"
+
+# get version
+$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json
+$Version = $PackageJson.version
+$Quality = "$env:VSCODE_QUALITY"
+
+$AssetPlatform = if ("$Arch" -eq "ia32") { "win32" } else { "win32-x64" }
+
+exec { node build/azure-pipelines/common/publish.js $Quality "$AssetPlatform-archive" archive "VSCode-win32-$Arch-$Version.zip" $Version true $Zip }
+exec { node build/azure-pipelines/common/publish.js $Quality "$AssetPlatform" setup "VSCodeSetup-$Arch-$Version.exe" $Version true $SystemExe }
+exec { node build/azure-pipelines/common/publish.js $Quality "$AssetPlatform-user" setup "VSCodeUserSetup-$Arch-$Version.exe" $Version true $UserExe }
+
+# publish hockeyapp symbols
+$hockeyAppId = if ("$Arch" -eq "ia32") { "$env:VSCODE_HOCKEYAPP_ID_WIN32" } else { "$env:VSCODE_HOCKEYAPP_ID_WIN64" }
+exec { node build/azure-pipelines/common/symbols.js "$env:VSCODE_MIXIN_PASSWORD" "$env:VSCODE_HOCKEYAPP_TOKEN" "$Arch" $hockeyAppId }
diff --git a/build/builtInExtensions.json b/build/builtInExtensions.json
index 23c7b13f5df..b460362095f 100644
--- a/build/builtInExtensions.json
+++ b/build/builtInExtensions.json
@@ -1,7 +1,7 @@
[
{
"name": "ms-vscode.node-debug",
- "version": "1.30.1",
+ "version": "1.33.3",
"repo": "https://github.com/Microsoft/vscode-node-debug",
"metadata": {
"id": "b6ded8fb-a0a0-4c1c-acbd-ab2a3bc995a6",
@@ -16,7 +16,7 @@
},
{
"name": "ms-vscode.node-debug2",
- "version": "1.30.1",
+ "version": "1.33.0",
"repo": "https://github.com/Microsoft/vscode-node-debug2",
"metadata": {
"id": "36d19e17-7569-4841-a001-947eb18602b2",
@@ -31,7 +31,7 @@
},
{
"name": "ms-vscode.references-view",
- "version": "0.0.9",
+ "version": "0.0.27",
"repo": "https://github.com/Microsoft/vscode-reference-view",
"metadata": {
"id": "dc489f46-520d-4556-ae85-1f9eab3c412d",
diff --git a/build/download/download.js b/build/download/download.js
new file mode 100644
index 00000000000..c70bae336a6
--- /dev/null
+++ b/build/download/download.js
@@ -0,0 +1,91 @@
+"use strict";
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", { value: true });
+const https = require("https");
+const fs = require("fs");
+const path = require("path");
+const cp = require("child_process");
+function ensureDir(filepath) {
+ if (!fs.existsSync(filepath)) {
+ ensureDir(path.dirname(filepath));
+ fs.mkdirSync(filepath);
+ }
+}
+function download(options, destination) {
+ ensureDir(path.dirname(destination));
+ return new Promise((c, e) => {
+ const fd = fs.openSync(destination, 'w');
+ const req = https.get(options, (res) => {
+ res.on('data', (chunk) => {
+ fs.writeSync(fd, chunk);
+ });
+ res.on('end', () => {
+ fs.closeSync(fd);
+ c();
+ });
+ });
+ req.on('error', (reqErr) => {
+ console.error(`request to ${options.host}${options.path} failed.`);
+ console.error(reqErr);
+ e(reqErr);
+ });
+ });
+}
+const MARKER_ARGUMENT = `_download_fork_`;
+function base64encode(str) {
+ return Buffer.from(str, 'utf8').toString('base64');
+}
+function base64decode(str) {
+ return Buffer.from(str, 'base64').toString('utf8');
+}
+function downloadInExternalProcess(options) {
+ const url = `https://${options.requestOptions.host}${options.requestOptions.path}`;
+ console.log(`Downloading ${url}...`);
+ return new Promise((c, e) => {
+ const child = cp.fork(__filename, [MARKER_ARGUMENT, base64encode(JSON.stringify(options))], {
+ stdio: ['pipe', 'pipe', 'pipe', 'ipc']
+ });
+ let stderr = [];
+ child.stderr.on('data', (chunk) => {
+ stderr.push(typeof chunk === 'string' ? Buffer.from(chunk) : chunk);
+ });
+ child.on('exit', (code) => {
+ if (code === 0) {
+ // normal termination
+ console.log(`Finished downloading ${url}.`);
+ c();
+ }
+ else {
+ // abnormal termination
+ console.error(Buffer.concat(stderr).toString());
+ e(new Error(`Download of ${url} failed.`));
+ }
+ });
+ });
+}
+exports.downloadInExternalProcess = downloadInExternalProcess;
+function _downloadInExternalProcess() {
+ let options;
+ try {
+ options = JSON.parse(base64decode(process.argv[3]));
+ }
+ catch (err) {
+ console.error(`Cannot read arguments`);
+ console.error(err);
+ process.exit(-1);
+ return;
+ }
+ download(options.requestOptions, options.destinationPath).then(() => {
+ process.exit(0);
+ }, (err) => {
+ console.error(err);
+ process.exit(-2);
+ });
+}
+if (process.argv.length >= 4 && process.argv[2] === MARKER_ARGUMENT) {
+ // running as forked download script
+ _downloadInExternalProcess();
+}
diff --git a/build/download/download.ts b/build/download/download.ts
new file mode 100644
index 00000000000..01ac8864d0b
--- /dev/null
+++ b/build/download/download.ts
@@ -0,0 +1,111 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import * as https from 'https';
+import * as fs from 'fs';
+import * as path from 'path';
+import * as cp from 'child_process';
+
+function ensureDir(filepath: string) {
+ if (!fs.existsSync(filepath)) {
+ ensureDir(path.dirname(filepath));
+ fs.mkdirSync(filepath);
+ }
+}
+
+function download(options: https.RequestOptions, destination: string): Promise {
+ ensureDir(path.dirname(destination));
+
+ return new Promise((c, e) => {
+ const fd = fs.openSync(destination, 'w');
+ const req = https.get(options, (res) => {
+ res.on('data', (chunk) => {
+ fs.writeSync(fd, chunk);
+ });
+ res.on('end', () => {
+ fs.closeSync(fd);
+ c();
+ });
+ });
+ req.on('error', (reqErr) => {
+ console.error(`request to ${options.host}${options.path} failed.`);
+ console.error(reqErr);
+ e(reqErr);
+ });
+ });
+}
+
+const MARKER_ARGUMENT = `_download_fork_`;
+
+function base64encode(str: string): string {
+ return Buffer.from(str, 'utf8').toString('base64');
+}
+
+function base64decode(str: string): string {
+ return Buffer.from(str, 'base64').toString('utf8');
+}
+
+export interface IDownloadRequestOptions {
+ host: string;
+ path: string;
+}
+
+export interface IDownloadOptions {
+ requestOptions: IDownloadRequestOptions;
+ destinationPath: string;
+}
+
+export function downloadInExternalProcess(options: IDownloadOptions): Promise {
+ const url = `https://${options.requestOptions.host}${options.requestOptions.path}`;
+ console.log(`Downloading ${url}...`);
+ return new Promise((c, e) => {
+ const child = cp.fork(
+ __filename,
+ [MARKER_ARGUMENT, base64encode(JSON.stringify(options))],
+ {
+ stdio: ['pipe', 'pipe', 'pipe', 'ipc']
+ }
+ );
+ let stderr: Buffer[] = [];
+ child.stderr.on('data', (chunk) => {
+ stderr.push(typeof chunk === 'string' ? Buffer.from(chunk) : chunk);
+ });
+ child.on('exit', (code) => {
+ if (code === 0) {
+ // normal termination
+ console.log(`Finished downloading ${url}.`);
+ c();
+ } else {
+ // abnormal termination
+ console.error(Buffer.concat(stderr).toString());
+ e(new Error(`Download of ${url} failed.`));
+ }
+ });
+ });
+}
+
+function _downloadInExternalProcess() {
+ let options: IDownloadOptions;
+ try {
+ options = JSON.parse(base64decode(process.argv[3]));
+ } catch (err) {
+ console.error(`Cannot read arguments`);
+ console.error(err);
+ process.exit(-1);
+ return;
+ }
+
+ download(options.requestOptions, options.destinationPath).then(() => {
+ process.exit(0);
+ }, (err) => {
+ console.error(err);
+ process.exit(-2);
+ });
+}
+
+if (process.argv.length >= 4 && process.argv[2] === MARKER_ARGUMENT) {
+ // running as forked download script
+ _downloadInExternalProcess();
+}
diff --git a/build/gulpfile.compile.js b/build/gulpfile.compile.js
new file mode 100644
index 00000000000..0dd2e5abf19
--- /dev/null
+++ b/build/gulpfile.compile.js
@@ -0,0 +1,18 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+'use strict';
+
+const util = require('./lib/util');
+const task = require('./lib/task');
+const compilation = require('./lib/compilation');
+const { compileExtensionsBuildTask } = require('./gulpfile.extensions');
+
+// Full compile, including nls and inline sources in sourcemaps, for build
+const compileClientBuildTask = task.define('compile-client-build', task.series(util.rimraf('out-build'), compilation.compileTask('src', 'out-build', true)));
+
+// All Build
+const compileBuildTask = task.define('compile-build', task.parallel(compileClientBuildTask, compileExtensionsBuildTask));
+exports.compileBuildTask = compileBuildTask;
\ No newline at end of file
diff --git a/build/gulpfile.editor.js b/build/gulpfile.editor.js
index 1e19fe65e1d..7bbf246a8dc 100644
--- a/build/gulpfile.editor.js
+++ b/build/gulpfile.editor.js
@@ -6,6 +6,7 @@
const gulp = require('gulp');
const path = require('path');
const util = require('./lib/util');
+const task = require('./lib/task');
const common = require('./lib/optimize');
const es = require('event-stream');
const File = require('vinyl');
@@ -48,9 +49,6 @@ var editorResources = [
'!**/test/**'
];
-var editorOtherSources = [
-];
-
var BUNDLED_FILE_HEADER = [
'/*!-----------------------------------------------------------',
' * Copyright (c) Microsoft Corporation. All rights reserved.',
@@ -63,8 +61,7 @@ var BUNDLED_FILE_HEADER = [
const languages = i18n.defaultLanguages.concat([]); // i18n.defaultLanguages.concat(process.env.VSCODE_QUALITY !== 'stable' ? i18n.extraLanguages : []);
-gulp.task('clean-editor-src', util.rimraf('out-editor-src'));
-gulp.task('extract-editor-src', ['clean-editor-src'], function () {
+const extractEditorSrcTask = task.define('extract-editor-src', () => {
console.log(`If the build fails, consider tweaking shakeLevel below to a lower value.`);
const apiusages = monacoapi.execute().usageContent;
const extrausages = fs.readFileSync(path.join(root, 'build', 'monaco', 'monaco.usage.recipe')).toString();
@@ -84,6 +81,7 @@ gulp.task('extract-editor-src', ['clean-editor-src'], function () {
'typings/thenable.d.ts',
'typings/es6-promise.d.ts',
'typings/require-monaco.d.ts',
+ "typings/lib.es2018.promise.d.ts",
'vs/monaco.d.ts'
],
libs: [
@@ -95,20 +93,16 @@ gulp.task('extract-editor-src', ['clean-editor-src'], function () {
'vs/base/browser/ui/octiconLabel/octiconLabel': 'vs/base/browser/ui/octiconLabel/octiconLabel.mock',
},
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
- importIgnorePattern: /^vs\/css!/,
+ importIgnorePattern: /(^vs\/css!)|(promise-polyfill\/polyfill)/,
destRoot: path.join(root, 'out-editor-src')
});
});
-// Full compile, including nls and inline sources in sourcemaps, for build
-gulp.task('clean-editor-build', util.rimraf('out-editor-build'));
-gulp.task('compile-editor-build', ['clean-editor-build', 'extract-editor-src'], compilation.compileTask('out-editor-src', 'out-editor-build', true));
+const compileEditorAMDTask = task.define('compile-editor-amd', compilation.compileTask('out-editor-src', 'out-editor-build', true));
-gulp.task('clean-optimized-editor', util.rimraf('out-editor'));
-gulp.task('optimize-editor', ['clean-optimized-editor', 'compile-editor-build'], common.optimizeTask({
+const optimizeEditorAMDTask = task.define('optimize-editor-amd', common.optimizeTask({
src: 'out-editor-build',
entryPoints: editorEntryPoints,
- otherSources: editorOtherSources,
resources: editorResources,
loaderConfig: {
paths: {
@@ -125,11 +119,9 @@ gulp.task('optimize-editor', ['clean-optimized-editor', 'compile-editor-build'],
languages: languages
}));
-gulp.task('clean-minified-editor', util.rimraf('out-editor-min'));
-gulp.task('minify-editor', ['clean-minified-editor', 'optimize-editor'], common.minifyTask('out-editor'));
+const minifyEditorAMDTask = task.define('minify-editor-amd', common.minifyTask('out-editor'));
-gulp.task('clean-editor-esm', util.rimraf('out-editor-esm'));
-gulp.task('extract-editor-esm', ['clean-editor-esm', 'clean-editor-distro', 'extract-editor-src'], function () {
+const createESMSourcesAndResourcesTask = task.define('extract-editor-esm', () => {
standalone.createESMSourcesAndResources2({
srcFolder: './out-editor-src',
outFolder: './out-editor-esm',
@@ -151,7 +143,8 @@ gulp.task('extract-editor-esm', ['clean-editor-esm', 'clean-editor-distro', 'ext
}
});
});
-gulp.task('compile-editor-esm', ['extract-editor-esm', 'clean-editor-distro'], function () {
+
+const compileEditorESMTask = task.define('compile-editor-esm', () => {
if (process.platform === 'win32') {
const result = cp.spawnSync(`..\\node_modules\\.bin\\tsc.cmd`, {
cwd: path.join(__dirname, '../out-editor-esm')
@@ -202,8 +195,16 @@ function toExternalDTS(contents) {
return lines.join('\n');
}
-gulp.task('clean-editor-distro', util.rimraf('out-monaco-editor-core'));
-gulp.task('editor-distro', ['clean-editor-distro', 'compile-editor-esm', 'minify-editor', 'optimize-editor'], function () {
+function filterStream(testFunc) {
+ return es.through(function (data) {
+ if (!testFunc(data.relative)) {
+ return;
+ }
+ this.emit('data', data);
+ });
+}
+
+const finalEditorResourcesTask = task.define('final-editor-resources', () => {
return es.merge(
// other assets
es.merge(
@@ -233,6 +234,14 @@ gulp.task('editor-distro', ['clean-editor-distro', 'compile-editor-esm', 'minify
}))
.pipe(gulp.dest('out-monaco-editor-core')),
+ // version.txt
+ gulp.src('build/monaco/version.txt')
+ .pipe(es.through(function (data) {
+ data.contents = Buffer.from(`monaco-editor-core: https://github.com/Microsoft/vscode/tree/${sha1}`);
+ this.emit('data', data);
+ }))
+ .pipe(gulp.dest('out-monaco-editor-core')),
+
// README.md
gulp.src('build/monaco/README-npm.md')
.pipe(es.through(function (data) {
@@ -266,7 +275,7 @@ gulp.task('editor-distro', ['clean-editor-distro', 'compile-editor-esm', 'minify
var strContents = data.contents.toString();
var newStr = '//# sourceMappingURL=' + relativePathToMap.replace(/\\/g, '/');
- strContents = strContents.replace(/\/\/\# sourceMappingURL=[^ ]+$/, newStr);
+ strContents = strContents.replace(/\/\/# sourceMappingURL=[^ ]+$/, newStr);
data.contents = Buffer.from(strContents);
this.emit('data', data);
@@ -282,59 +291,31 @@ gulp.task('editor-distro', ['clean-editor-distro', 'compile-editor-esm', 'minify
);
});
-gulp.task('analyze-editor-distro', function () {
- // @ts-ignore
- var bundleInfo = require('../out-editor/bundleInfo.json');
- var graph = bundleInfo.graph;
- var bundles = bundleInfo.bundles;
-
- var inverseGraph = {};
- Object.keys(graph).forEach(function (module) {
- var dependencies = graph[module];
- dependencies.forEach(function (dep) {
- inverseGraph[dep] = inverseGraph[dep] || [];
- inverseGraph[dep].push(module);
- });
- });
-
- var detailed = {};
- Object.keys(bundles).forEach(function (entryPoint) {
- var included = bundles[entryPoint];
- var includedMap = {};
- included.forEach(function (included) {
- includedMap[included] = true;
- });
-
- var explanation = [];
- included.map(function (included) {
- if (included.indexOf('!') >= 0) {
- return;
- }
-
- var reason = (inverseGraph[included] || []).filter(function (mod) {
- return !!includedMap[mod];
- });
- explanation.push({
- module: included,
- reason: reason
- });
- });
-
- detailed[entryPoint] = explanation;
- });
-
- console.log(JSON.stringify(detailed, null, '\t'));
-});
-
-function filterStream(testFunc) {
- return es.through(function (data) {
- if (!testFunc(data.relative)) {
- return;
- }
- this.emit('data', data);
- });
-}
-
+gulp.task('editor-distro',
+ task.series(
+ task.parallel(
+ util.rimraf('out-editor-src'),
+ util.rimraf('out-editor-build'),
+ util.rimraf('out-editor-esm'),
+ util.rimraf('out-monaco-editor-core'),
+ util.rimraf('out-editor'),
+ util.rimraf('out-editor-min')
+ ),
+ extractEditorSrcTask,
+ task.parallel(
+ task.series(
+ compileEditorAMDTask,
+ optimizeEditorAMDTask,
+ minifyEditorAMDTask
+ ),
+ task.series(
+ createESMSourcesAndResourcesTask,
+ compileEditorESMTask
+ )
+ ),
+ finalEditorResourcesTask
+ )
+);
//#region monaco type checking
@@ -354,6 +335,7 @@ function createTscCompileTask(watch) {
let errors = [];
let reporter = createReporter();
let report;
+ // eslint-disable-next-line no-control-regex
let magic = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; // https://stackoverflow.com/questions/25245716/remove-all-ansi-colors-styles-from-strings
child.stdout.on('data', data => {
@@ -387,7 +369,10 @@ function createTscCompileTask(watch) {
};
}
-gulp.task('monaco-typecheck-watch', createTscCompileTask(true));
-gulp.task('monaco-typecheck', createTscCompileTask(false));
+const monacoTypecheckWatchTask = task.define('monaco-typecheck-watch', createTscCompileTask(true));
+exports.monacoTypecheckWatchTask = monacoTypecheckWatchTask;
+
+const monacoTypecheckTask = task.define('monaco-typecheck', createTscCompileTask(false));
+exports.monacoTypecheckTask = monacoTypecheckTask;
//#endregion
diff --git a/build/gulpfile.extensions.js b/build/gulpfile.extensions.js
index 1488f96ec44..c72b26cafed 100644
--- a/build/gulpfile.extensions.js
+++ b/build/gulpfile.extensions.js
@@ -11,8 +11,8 @@ const path = require('path');
const tsb = require('gulp-tsb');
const es = require('event-stream');
const filter = require('gulp-filter');
-const rimraf = require('rimraf');
const util = require('./lib/util');
+const task = require('./lib/task');
const watcher = require('./lib/watch');
const createReporter = require('./lib/reporter').createReporter;
const glob = require('glob');
@@ -43,16 +43,6 @@ const tasks = compilations.map(function (tsconfigFile) {
const name = relativeDirname.replace(/\//g, '-');
- // Tasks
- const clean = 'clean-extension:' + name;
- const compile = 'compile-extension:' + name;
- const watch = 'watch-extension:' + name;
-
- // Build Tasks
- const cleanBuild = 'clean-extension-build:' + name;
- const compileBuild = 'compile-extension-build:' + name;
- const watchBuild = 'watch-extension-build:' + name;
-
const root = path.join('extensions', relativeDirname);
const srcBase = path.join(root, 'src');
const src = path.join(srcBase, '**');
@@ -111,18 +101,18 @@ const tasks = compilations.map(function (tsconfigFile) {
const srcOpts = { cwd: path.dirname(__dirname), base: srcBase };
- gulp.task(clean, cb => rimraf(out, cb));
+ const cleanTask = task.define(`clean-extension-${name}`, util.rimraf(out));
- gulp.task(compile, [clean], () => {
+ const compileTask = task.define(`compile-extension:${name}`, task.series(cleanTask, () => {
const pipeline = createPipeline(false, true);
const input = gulp.src(src, srcOpts);
return input
.pipe(pipeline())
.pipe(gulp.dest(out));
- });
+ }));
- gulp.task(watch, [clean], () => {
+ const watchTask = task.define(`watch-extension:${name}`, task.series(cleanTask, () => {
const pipeline = createPipeline(false);
const input = gulp.src(src, srcOpts);
const watchInput = watcher(src, srcOpts);
@@ -130,43 +120,35 @@ const tasks = compilations.map(function (tsconfigFile) {
return watchInput
.pipe(util.incremental(pipeline, input))
.pipe(gulp.dest(out));
- });
+ }));
- gulp.task(cleanBuild, cb => rimraf(out, cb));
-
- gulp.task(compileBuild, [clean], () => {
+ const compileBuildTask = task.define(`compile-build-extension-${name}`, task.series(cleanTask, () => {
const pipeline = createPipeline(true, true);
const input = gulp.src(src, srcOpts);
return input
.pipe(pipeline())
.pipe(gulp.dest(out));
- });
+ }));
- gulp.task(watchBuild, [clean], () => {
- const pipeline = createPipeline(true);
- const input = gulp.src(src, srcOpts);
- const watchInput = watcher(src, srcOpts);
-
- return watchInput
- .pipe(util.incremental(() => pipeline(), input))
- .pipe(gulp.dest(out));
- });
+ // Tasks
+ gulp.task(compileTask);
+ gulp.task(watchTask);
return {
- clean: clean,
- compile: compile,
- watch: watch,
- cleanBuild: cleanBuild,
- compileBuild: compileBuild,
- watchBuild: watchBuild
+ compileTask: compileTask,
+ watchTask: watchTask,
+ compileBuildTask: compileBuildTask
};
});
-gulp.task('clean-extensions', tasks.map(t => t.clean));
-gulp.task('compile-extensions', tasks.map(t => t.compile));
-gulp.task('watch-extensions', tasks.map(t => t.watch));
+const compileExtensionsTask = task.define('compile-extensions', task.parallel(...tasks.map(t => t.compileTask)));
+gulp.task(compileExtensionsTask);
+exports.compileExtensionsTask = compileExtensionsTask;
-gulp.task('clean-extensions-build', tasks.map(t => t.cleanBuild));
-gulp.task('compile-extensions-build', tasks.map(t => t.compileBuild));
-gulp.task('watch-extensions-build', tasks.map(t => t.watchBuild));
+const watchExtensionsTask = task.define('watch-extensions', task.parallel(...tasks.map(t => t.watchTask)));
+gulp.task(watchExtensionsTask);
+exports.watchExtensionsTask = watchExtensionsTask;
+
+const compileExtensionsBuildTask = task.define('compile-extensions-build', task.parallel(...tasks.map(t => t.compileBuildTask)));
+exports.compileExtensionsBuildTask = compileExtensionsBuildTask;
diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js
index 16d187ffc2c..50082693334 100644
--- a/build/gulpfile.hygiene.js
+++ b/build/gulpfile.hygiene.js
@@ -42,7 +42,8 @@ const indentationFilter = [
// except specific files
'!ThirdPartyNotices.txt',
- '!LICENSE.txt',
+ '!LICENSE.{txt,rtf}',
+ '!LICENSES.chromium.html',
'!**/LICENSE',
'!src/vs/nls.js',
'!src/vs/nls.build.js',
@@ -50,7 +51,6 @@ const indentationFilter = [
'!src/vs/css.build.js',
'!src/vs/loader.js',
'!src/vs/base/common/marked/marked.js',
- '!src/vs/base/common/winjs.base.js',
'!src/vs/base/node/terminateProcess.sh',
'!src/vs/base/node/cpuUsage.sh',
'!test/assert.js',
@@ -82,11 +82,12 @@ const indentationFilter = [
'!src/typings/**/*.d.ts',
'!extensions/**/*.d.ts',
'!**/*.{svg,exe,png,bmp,scpt,bat,cmd,cur,ttf,woff,eot,md,ps1,template,yaml,yml,d.ts.recipe,ico,icns}',
- '!build/{lib,tslintRules}/**/*.js',
+ '!build/{lib,tslintRules,download}/**/*.js',
'!build/**/*.sh',
'!build/azure-pipelines/**/*.js',
'!build/azure-pipelines/**/*.config',
'!**/Dockerfile',
+ '!**/Dockerfile.*',
'!**/*.Dockerfile',
'!**/*.dockerfile',
'!extensions/markdown-language-features/media/*.js'
@@ -110,10 +111,12 @@ const copyrightFilter = [
'!**/*.opts',
'!**/*.disabled',
'!**/*.code-workspace',
+ '!**/promise-polyfill/polyfill.js',
'!build/**/*.init',
'!resources/linux/snap/snapcraft.yaml',
'!resources/linux/snap/electron-launch',
'!resources/win32/bin/code.js',
+ '!resources/completions/**',
'!extensions/markdown-language-features/media/highlight.css',
'!extensions/html-language-features/server/src/modes/typescript/*',
'!extensions/*/server/bin/*'
@@ -127,7 +130,6 @@ const eslintFilter = [
'!src/vs/nls.js',
'!src/vs/css.build.js',
'!src/vs/nls.build.js',
- '!src/**/winjs.base.js',
'!src/**/marked.js',
'!**/test/**'
];
@@ -228,7 +230,7 @@ function hygiene(some) {
let formatted = result.dest.replace(/\r\n/gm, '\n');
if (original !== formatted) {
- console.error('File not formatted:', file.relative);
+ console.error("File not formatted. Run the 'Format Document' command to fix it:", file.relative);
errorCount++;
}
cb(null, file);
diff --git a/build/gulpfile.mixin.js b/build/gulpfile.mixin.js
index 0b032152cf9..690cc874899 100644
--- a/build/gulpfile.mixin.js
+++ b/build/gulpfile.mixin.js
@@ -10,20 +10,11 @@ const json = require('gulp-json-editor');
const buffer = require('gulp-buffer');
const filter = require('gulp-filter');
const es = require('event-stream');
-const util = require('./lib/util');
-const remote = require('gulp-remote-src');
-const zip = require('gulp-vinyl-zip');
-
-const pkg = require('../package.json');
+const vfs = require('vinyl-fs');
+const fancyLog = require('fancy-log');
+const ansiColors = require('ansi-colors');
gulp.task('mixin', function () {
- const repo = process.env['VSCODE_MIXIN_REPO'];
-
- if (!repo) {
- console.log('Missing VSCODE_MIXIN_REPO, skipping mixin');
- return;
- }
-
const quality = process.env['VSCODE_QUALITY'];
if (!quality) {
@@ -31,38 +22,18 @@ gulp.task('mixin', function () {
return;
}
- const url = `https://github.com/${repo}/archive/${pkg.distro}.zip`;
- const opts = { base: url };
- const username = process.env['VSCODE_MIXIN_USERNAME'];
- const password = process.env['VSCODE_MIXIN_PASSWORD'];
+ const productJsonFilter = filter('product.json', { restore: true });
- if (username || password) {
- opts.auth = { user: username || '', pass: password || '' };
- }
-
- console.log('Mixing in sources from \'' + url + '\':');
-
- let all = remote('', opts)
- .pipe(zip.src())
+ fancyLog(ansiColors.blue('[mixin]'), `Mixing in sources:`);
+ return vfs
+ .src(`quality/${quality}/**`, { base: `quality/${quality}` })
.pipe(filter(function (f) { return !f.isDirectory(); }))
- .pipe(util.rebase(1));
-
- if (quality) {
- const productJsonFilter = filter('product.json', { restore: true });
- const mixin = all
- .pipe(filter(['quality/' + quality + '/**']))
- .pipe(util.rebase(2))
- .pipe(productJsonFilter)
- .pipe(buffer())
- .pipe(json(o => Object.assign({}, require('../product.json'), o)))
- .pipe(productJsonFilter.restore);
-
- all = es.merge(mixin);
- }
-
- return all
+ .pipe(productJsonFilter)
+ .pipe(buffer())
+ .pipe(json(o => Object.assign({}, require('../product.json'), o)))
+ .pipe(productJsonFilter.restore)
.pipe(es.mapSync(function (f) {
- console.log(f.relative);
+ fancyLog(ansiColors.blue('[mixin]'), f.relative, ansiColors.green('✔︎'));
return f;
}))
.pipe(gulp.dest('.'));
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index 326fac6bc24..57ca292ef73 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -20,6 +20,7 @@ const filter = require('gulp-filter');
const json = require('gulp-json-editor');
const _ = require('underscore');
const util = require('./lib/util');
+const task = require('./lib/task');
const ext = require('./lib/extensions');
const buildfile = require('../src/buildfile');
const common = require('./lib/optimize');
@@ -32,6 +33,8 @@ const i18n = require('./lib/i18n');
const deps = require('./dependencies');
const getElectronVersion = require('./lib/electron').getElectronVersion;
const createAsar = require('./lib/asar').createAsar;
+const minimist = require('minimist');
+const { compileBuildTask } = require('./gulpfile.compile');
const productionDependencies = deps.getProductionDependencies(path.dirname(__dirname));
// @ts-ignore
@@ -60,16 +63,19 @@ const vscodeResources = [
'out-build/bootstrap-window.js',
'out-build/paths.js',
'out-build/vs/**/*.{svg,png,cur,html}',
+ '!out-build/vs/code/browser/**/*.html',
'out-build/vs/base/common/performance.js',
- 'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh}',
+ 'out-build/vs/base/node/languagePacks.js',
+ 'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh,ps.sh}',
'out-build/vs/base/browser/ui/octiconLabel/octicons/**',
'out-build/vs/workbench/browser/media/*-theme.css',
- 'out-build/vs/workbench/parts/debug/**/*.json',
- 'out-build/vs/workbench/parts/execution/**/*.scpt',
- 'out-build/vs/workbench/parts/webview/electron-browser/webview-pre.js',
+ 'out-build/vs/workbench/contrib/debug/**/*.json',
+ 'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
+ 'out-build/vs/workbench/contrib/webview/browser/pre/*.js',
+ 'out-build/vs/workbench/contrib/webview/electron-browser/pre/*.js',
'out-build/vs/**/markdown.css',
- 'out-build/vs/workbench/parts/tasks/**/*.json',
- 'out-build/vs/workbench/parts/welcome/walkThrough/**/*.md',
+ 'out-build/vs/workbench/contrib/tasks/**/*.json',
+ 'out-build/vs/workbench/contrib/welcome/walkThrough/**/*.md',
'out-build/vs/workbench/services/files/**/*.exe',
'out-build/vs/workbench/services/files/**/*.md',
'out-build/vs/code/electron-browser/workbench/**',
@@ -85,29 +91,41 @@ const BUNDLED_FILE_HEADER = [
' *--------------------------------------------------------*/'
].join('\n');
-gulp.task('clean-optimized-vscode', util.rimraf('out-vscode'));
-gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compile-extensions-build'], common.optimizeTask({
- src: 'out-build',
- entryPoints: vscodeEntryPoints,
- otherSources: [],
- resources: vscodeResources,
- loaderConfig: common.loaderConfig(nodeModules),
- header: BUNDLED_FILE_HEADER,
- out: 'out-vscode',
- bundleInfo: undefined
-}));
+const optimizeVSCodeTask = task.define('optimize-vscode', task.series(
+ task.parallel(
+ util.rimraf('out-vscode'),
+ compileBuildTask
+ ),
+ common.optimizeTask({
+ src: 'out-build',
+ entryPoints: vscodeEntryPoints,
+ resources: vscodeResources,
+ loaderConfig: common.loaderConfig(nodeModules),
+ header: BUNDLED_FILE_HEADER,
+ out: 'out-vscode',
+ bundleInfo: undefined
+ })
+));
-gulp.task('optimize-index-js', ['optimize-vscode'], () => {
- const fullpath = path.join(process.cwd(), 'out-vscode/vs/code/electron-browser/workbench/workbench.js');
- const contents = fs.readFileSync(fullpath).toString();
- const newContents = contents.replace('[/*BUILD->INSERT_NODE_MODULES*/]', JSON.stringify(nodeModules));
- fs.writeFileSync(fullpath, newContents);
-});
+const optimizeIndexJSTask = task.define('optimize-index-js', task.series(
+ optimizeVSCodeTask,
+ () => {
+ const fullpath = path.join(process.cwd(), 'out-vscode/bootstrap-window.js');
+ const contents = fs.readFileSync(fullpath).toString();
+ const newContents = contents.replace('[/*BUILD->INSERT_NODE_MODULES*/]', JSON.stringify(nodeModules));
+ fs.writeFileSync(fullpath, newContents);
+ }
+));
const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`;
-gulp.task('clean-minified-vscode', util.rimraf('out-vscode-min'));
-gulp.task('minify-vscode', ['clean-minified-vscode', 'optimize-index-js'], common.minifyTask('out-vscode', `${sourceMappingURLBase}/core`));
+const minifyVSCodeTask = task.define('minify-vscode', task.series(
+ task.parallel(
+ util.rimraf('out-vscode-min'),
+ optimizeIndexJSTask
+ ),
+ common.minifyTask('out-vscode', `${sourceMappingURLBase}/core`)
+));
// Package
@@ -128,7 +146,7 @@ const config = {
version: getElectronVersion(),
productAppName: product.nameLong,
companyName: 'Microsoft Corporation',
- copyright: 'Copyright (C) 2018 Microsoft. All rights reserved',
+ copyright: 'Copyright (C) 2019 Microsoft. All rights reserved',
darwinIcon: 'resources/darwin/code.icns',
darwinBundleIdentifier: product.darwinBundleIdentifier,
darwinApplicationCategoryType: 'public.app-category.developer-tools',
@@ -170,13 +188,13 @@ const config = {
urlSchemes: [product.urlProtocol]
}],
darwinForceDarkModeSupport: true,
- darwinCredits: darwinCreditsTemplate ? Buffer.from(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : void 0,
+ darwinCredits: darwinCreditsTemplate ? Buffer.from(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : undefined,
linuxExecutableName: product.applicationName,
winIcon: 'resources/win32/code.ico',
- token: process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || void 0,
+ token: process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || undefined,
// @ts-ignore JSON checking: electronRepository is optional
- repo: product.electronRepository || void 0
+ repo: product.electronRepository || undefined
};
function getElectron(arch) {
@@ -196,13 +214,11 @@ function getElectron(arch) {
};
}
-gulp.task('clean-electron', util.rimraf('.build/electron'));
-gulp.task('electron', ['clean-electron'], getElectron(process.arch));
-gulp.task('electron-ia32', ['clean-electron'], getElectron('ia32'));
-gulp.task('electron-x64', ['clean-electron'], getElectron('x64'));
-gulp.task('electron-arm', ['clean-electron'], getElectron('arm'));
-gulp.task('electron-arm64', ['clean-electron'], getElectron('arm64'));
-
+gulp.task(task.define('electron', task.series(util.rimraf('.build/electron'), getElectron(process.arch))));
+gulp.task(task.define('electron-ia32', task.series(util.rimraf('.build/electron'), getElectron('ia32'))));
+gulp.task(task.define('electron-x64', task.series(util.rimraf('.build/electron'), getElectron('x64'))));
+gulp.task(task.define('electron-arm', task.series(util.rimraf('.build/electron'), getElectron('armv7l'))));
+gulp.task(task.define('electron-arm64', task.series(util.rimraf('.build/electron'), getElectron('arm64'))));
/**
* Compute checksums for some files.
@@ -238,14 +254,14 @@ function computeChecksum(filename) {
return hash;
}
-function packageTask(platform, arch, opts) {
+function packageTask(platform, arch, sourceFolderName, destinationFolderName, opts) {
opts = opts || {};
- const destination = path.join(path.dirname(root), 'VSCode') + (platform ? '-' + platform : '') + (arch ? '-' + arch : '');
+ const destination = path.join(path.dirname(root), destinationFolderName);
platform = platform || process.platform;
return () => {
- const out = opts.minified ? 'out-vscode-min' : 'out-vscode';
+ const out = sourceFolderName;
const checksums = computeChecksums(out, [
'vs/workbench/workbench.main.js',
@@ -294,9 +310,7 @@ function packageTask(platform, arch, opts) {
const productJsonStream = gulp.src(['product.json'], { base: '.' })
.pipe(json(productJsonUpdate));
- const license = gulp.src(['LICENSES.chromium.html', 'LICENSE.txt', 'ThirdPartyNotices.txt', 'licenses/**'], { base: '.' });
-
- const watermark = gulp.src(['resources/letterpress.svg', 'resources/letterpress-dark.svg', 'resources/letterpress-hc.svg'], { base: '.' });
+ const license = gulp.src(['LICENSES.chromium.html', product.licenseFileName, 'ThirdPartyNotices.txt', 'licenses/**'], { base: '.', allowEmpty: true });
// TODO the API should be copied to `out` during compile, not here
const api = gulp.src('src/vs/vscode.d.ts').pipe(rename('out/vs/vscode.d.ts'));
@@ -309,29 +323,13 @@ function packageTask(platform, arch, opts) {
const deps = gulp.src(depsSrc, { base: '.', dot: true })
.pipe(filter(['**', '!**/package-lock.json']))
- .pipe(util.cleanNodeModule('fsevents', ['binding.gyp', 'fsevents.cc', 'build/**', 'src/**', 'test/**'], ['**/*.node']))
- .pipe(util.cleanNodeModule('vscode-sqlite3', ['binding.gyp', 'benchmark/**', 'cloudformation/**', 'deps/**', 'test/**', 'build/**', 'src/**'], ['build/Release/*.node']))
- .pipe(util.cleanNodeModule('oniguruma', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['build/Release/*.node', 'src/*.js']))
- .pipe(util.cleanNodeModule('windows-mutex', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
- .pipe(util.cleanNodeModule('native-keymap', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['build/Release/*.node']))
- .pipe(util.cleanNodeModule('native-is-elevated', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['build/Release/*.node']))
- .pipe(util.cleanNodeModule('native-watchdog', ['binding.gyp', 'build/**', 'src/**'], ['build/Release/*.node']))
- .pipe(util.cleanNodeModule('spdlog', ['binding.gyp', 'build/**', 'deps/**', 'src/**', 'test/**'], ['build/Release/*.node']))
- .pipe(util.cleanNodeModule('jschardet', ['dist/**']))
- .pipe(util.cleanNodeModule('windows-foreground-love', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
- .pipe(util.cleanNodeModule('windows-process-tree', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
- .pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['build/Release/*.node', 'src/index.js']))
- .pipe(util.cleanNodeModule('keytar', ['binding.gyp', 'build/**', 'src/**', 'script/**', 'node_modules/**'], ['**/*.node']))
- .pipe(util.cleanNodeModule('node-pty', ['binding.gyp', 'build/**', 'src/**', 'tools/**'], ['build/Release/*.exe', 'build/Release/*.dll', 'build/Release/*.node']))
- .pipe(util.cleanNodeModule('vscode-nsfw', ['binding.gyp', 'build/**', 'src/**', 'openpa/**', 'includes/**'], ['build/Release/*.node', '**/*.a']))
- .pipe(util.cleanNodeModule('vsda', ['binding.gyp', 'README.md', 'build/**', '*.bat', '*.sh', '*.cpp', '*.h'], ['build/Release/vsda.node']))
+ .pipe(util.cleanNodeModules(path.join(__dirname, '.nativeignore')))
.pipe(createAsar(path.join(process.cwd(), 'node_modules'), ['**/*.node', '**/vscode-ripgrep/bin/*', '**/node-pty/build/Release/*'], 'app/node_modules.asar'));
let all = es.merge(
- packageJsonStream,
+ packageJsonStream,
productJsonStream,
license,
- watermark,
api,
sources,
deps
@@ -384,8 +382,10 @@ function packageTask(platform, arch, opts) {
.pipe(electron(_.extend({}, config, { platform, arch, ffmpegChromium: true })))
.pipe(filter(['**', '!LICENSE', '!LICENSES.chromium.html', '!version']));
+ // result = es.merge(result, gulp.src('resources/completions/**', { base: '.' }));
+
if (platform === 'win32') {
- result = es.merge(result, gulp.src('resources/win32/bin/code.js', { base: 'resources/win32' }));
+ result = es.merge(result, gulp.src('resources/win32/bin/code.js', { base: 'resources/win32', allowEmpty: true }));
result = es.merge(result, gulp.src('resources/win32/bin/code.cmd', { base: 'resources/win32' })
.pipe(replace('@@NAME@@', product.nameShort))
@@ -393,14 +393,18 @@ function packageTask(platform, arch, opts) {
result = es.merge(result, gulp.src('resources/win32/bin/code.sh', { base: 'resources/win32' })
.pipe(replace('@@NAME@@', product.nameShort))
+ .pipe(replace('@@PRODNAME@@', product.nameLong))
+ .pipe(replace('@@VERSION@@', version))
.pipe(replace('@@COMMIT@@', commit))
.pipe(replace('@@APPNAME@@', product.applicationName))
+ .pipe(replace('@@QUALITY@@', quality))
.pipe(rename(function (f) { f.basename = product.applicationName; f.extname = ''; })));
result = es.merge(result, gulp.src('resources/win32/VisualElementsManifest.xml', { base: 'resources/win32' })
.pipe(rename(product.nameShort + '.VisualElementsManifest.xml')));
} else if (platform === 'linux') {
result = es.merge(result, gulp.src('resources/linux/bin/code.sh', { base: '.' })
+ .pipe(replace('@@PRODNAME@@', product.nameLong))
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(rename('bin/' + product.applicationName)));
}
@@ -420,29 +424,35 @@ function packageTask(platform, arch, opts) {
const buildRoot = path.dirname(root);
-gulp.task('clean-vscode-win32-ia32', util.rimraf(path.join(buildRoot, 'VSCode-win32-ia32')));
-gulp.task('clean-vscode-win32-x64', util.rimraf(path.join(buildRoot, 'VSCode-win32-x64')));
-gulp.task('clean-vscode-darwin', util.rimraf(path.join(buildRoot, 'VSCode-darwin')));
-gulp.task('clean-vscode-linux-ia32', util.rimraf(path.join(buildRoot, 'VSCode-linux-ia32')));
-gulp.task('clean-vscode-linux-x64', util.rimraf(path.join(buildRoot, 'VSCode-linux-x64')));
-gulp.task('clean-vscode-linux-arm', util.rimraf(path.join(buildRoot, 'VSCode-linux-arm')));
-gulp.task('clean-vscode-linux-arm64', util.rimraf(path.join(buildRoot, 'VSCode-linux-arm64')));
+const BUILD_TARGETS = [
+ { platform: 'win32', arch: 'ia32' },
+ { platform: 'win32', arch: 'x64' },
+ { platform: 'darwin', arch: null, opts: { stats: true } },
+ { platform: 'linux', arch: 'ia32' },
+ { platform: 'linux', arch: 'x64' },
+ { platform: 'linux', arch: 'arm' },
+ { platform: 'linux', arch: 'arm64' },
+];
+BUILD_TARGETS.forEach(buildTarget => {
+ const dashed = (str) => (str ? `-${str}` : ``);
+ const platform = buildTarget.platform;
+ const arch = buildTarget.arch;
+ const opts = buildTarget.opts;
-gulp.task('vscode-win32-ia32', ['optimize-vscode', 'clean-vscode-win32-ia32'], packageTask('win32', 'ia32'));
-gulp.task('vscode-win32-x64', ['optimize-vscode', 'clean-vscode-win32-x64'], packageTask('win32', 'x64'));
-gulp.task('vscode-darwin', ['optimize-vscode', 'clean-vscode-darwin'], packageTask('darwin', null, { stats: true }));
-gulp.task('vscode-linux-ia32', ['optimize-vscode', 'clean-vscode-linux-ia32'], packageTask('linux', 'ia32'));
-gulp.task('vscode-linux-x64', ['optimize-vscode', 'clean-vscode-linux-x64'], packageTask('linux', 'x64'));
-gulp.task('vscode-linux-arm', ['optimize-vscode', 'clean-vscode-linux-arm'], packageTask('linux', 'arm'));
-gulp.task('vscode-linux-arm64', ['optimize-vscode', 'clean-vscode-linux-arm64'], packageTask('linux', 'arm64'));
+ ['', 'min'].forEach(minified => {
+ const sourceFolderName = `out-vscode${dashed(minified)}`;
+ const destinationFolderName = `VSCode${dashed(platform)}${dashed(arch)}`;
-gulp.task('vscode-win32-ia32-min', ['minify-vscode', 'clean-vscode-win32-ia32'], packageTask('win32', 'ia32', { minified: true }));
-gulp.task('vscode-win32-x64-min', ['minify-vscode', 'clean-vscode-win32-x64'], packageTask('win32', 'x64', { minified: true }));
-gulp.task('vscode-darwin-min', ['minify-vscode', 'clean-vscode-darwin'], packageTask('darwin', null, { minified: true, stats: true }));
-gulp.task('vscode-linux-ia32-min', ['minify-vscode', 'clean-vscode-linux-ia32'], packageTask('linux', 'ia32', { minified: true }));
-gulp.task('vscode-linux-x64-min', ['minify-vscode', 'clean-vscode-linux-x64'], packageTask('linux', 'x64', { minified: true }));
-gulp.task('vscode-linux-arm-min', ['minify-vscode', 'clean-vscode-linux-arm'], packageTask('linux', 'arm', { minified: true }));
-gulp.task('vscode-linux-arm64-min', ['minify-vscode', 'clean-vscode-linux-arm64'], packageTask('linux', 'arm64', { minified: true }));
+ const vscodeTask = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}`, task.series(
+ task.parallel(
+ minified ? minifyVSCodeTask : optimizeVSCodeTask,
+ util.rimraf(path.join(buildRoot, destinationFolderName))
+ ),
+ packageTask(platform, arch, sourceFolderName, destinationFolderName, opts)
+ ));
+ gulp.task(vscodeTask);
+ });
+});
// Transifex Localizations
@@ -465,42 +475,60 @@ const apiHostname = process.env.TRANSIFEX_API_URL;
const apiName = process.env.TRANSIFEX_API_NAME;
const apiToken = process.env.TRANSIFEX_API_TOKEN;
-gulp.task('vscode-translations-push', ['optimize-vscode'], function () {
- const pathToMetadata = './out-vscode/nls.metadata.json';
- const pathToExtensions = './extensions/*';
- const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}';
+gulp.task(task.define(
+ 'vscode-translations-push',
+ task.series(
+ optimizeVSCodeTask,
+ function () {
+ const pathToMetadata = './out-vscode/nls.metadata.json';
+ const pathToExtensions = './extensions/*';
+ const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}';
- return es.merge(
- gulp.src(pathToMetadata).pipe(i18n.createXlfFilesForCoreBundle()),
- gulp.src(pathToSetup).pipe(i18n.createXlfFilesForIsl()),
- gulp.src(pathToExtensions).pipe(i18n.createXlfFilesForExtensions())
- ).pipe(i18n.findObsoleteResources(apiHostname, apiName, apiToken)
- ).pipe(i18n.pushXlfFiles(apiHostname, apiName, apiToken));
-});
+ return es.merge(
+ gulp.src(pathToMetadata).pipe(i18n.createXlfFilesForCoreBundle()),
+ gulp.src(pathToSetup).pipe(i18n.createXlfFilesForIsl()),
+ gulp.src(pathToExtensions).pipe(i18n.createXlfFilesForExtensions())
+ ).pipe(i18n.findObsoleteResources(apiHostname, apiName, apiToken)
+ ).pipe(i18n.pushXlfFiles(apiHostname, apiName, apiToken));
+ }
+ )
+));
-gulp.task('vscode-translations-push-test', ['optimize-vscode'], function () {
- const pathToMetadata = './out-vscode/nls.metadata.json';
- const pathToExtensions = './extensions/*';
- const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}';
+gulp.task(task.define(
+ 'vscode-translations-export',
+ task.series(
+ optimizeVSCodeTask,
+ function () {
+ const pathToMetadata = './out-vscode/nls.metadata.json';
+ const pathToExtensions = './extensions/*';
+ const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}';
- return es.merge(
- gulp.src(pathToMetadata).pipe(i18n.createXlfFilesForCoreBundle()),
- gulp.src(pathToSetup).pipe(i18n.createXlfFilesForIsl()),
- gulp.src(pathToExtensions).pipe(i18n.createXlfFilesForExtensions())
- ).pipe(i18n.findObsoleteResources(apiHostname, apiName, apiToken)
- ).pipe(vfs.dest('../vscode-transifex-input'));
-});
+ return es.merge(
+ gulp.src(pathToMetadata).pipe(i18n.createXlfFilesForCoreBundle()),
+ gulp.src(pathToSetup).pipe(i18n.createXlfFilesForIsl()),
+ gulp.src(pathToExtensions).pipe(i18n.createXlfFilesForExtensions())
+ ).pipe(vfs.dest('../vscode-translations-export'));
+ }
+ )
+));
gulp.task('vscode-translations-pull', function () {
return es.merge([...i18n.defaultLanguages, ...i18n.extraLanguages].map(language => {
let includeDefault = !!innoSetupConfig[language.id].defaultInfo;
- return i18n.pullSetupXlfFiles(apiHostname, apiName, apiToken, language, includeDefault).pipe(vfs.dest(`../vscode-localization/${language.id}/setup`));
+ return i18n.pullSetupXlfFiles(apiHostname, apiName, apiToken, language, includeDefault).pipe(vfs.dest(`../vscode-translations-import/${language.id}/setup`));
}));
});
gulp.task('vscode-translations-import', function () {
+ var options = minimist(process.argv.slice(2), {
+ string: 'location',
+ default: {
+ location: '../vscode-translations-import'
+ }
+ });
return es.merge([...i18n.defaultLanguages, ...i18n.extraLanguages].map(language => {
- return gulp.src(`../vscode-localization/${language.id}/setup/*/*.xlf`)
+ let id = language.transifexId || language.id;
+ return gulp.src(`${options.location}/${id}/setup/*/*.xlf`)
.pipe(i18n.prepareIslFiles(language, innoSetupConfig[language.id]))
.pipe(vfs.dest(`./build/win32/i18n`));
}));
@@ -508,7 +536,7 @@ gulp.task('vscode-translations-import', function () {
// Sourcemaps
-gulp.task('upload-vscode-sourcemaps', ['vscode-darwin-min', 'minify-vscode'], () => {
+gulp.task('upload-vscode-sourcemaps', () => {
const vs = gulp.src('out-vscode-min/**/*.map', { base: 'out-vscode-min' })
.pipe(es.mapSync(f => {
f.path = `${f.base}/core/${f.relative}`;
@@ -532,57 +560,8 @@ gulp.task('upload-vscode-sourcemaps', ['vscode-darwin-min', 'minify-vscode'], ()
}));
});
-const allConfigDetailsPath = path.join(os.tmpdir(), 'configuration.json');
-gulp.task('upload-vscode-configuration', ['generate-vscode-configuration'], () => {
- if (!shouldSetupSettingsSearch()) {
- const branch = process.env.BUILD_SOURCEBRANCH;
- console.log(`Only runs on master and release branches, not ${branch}`);
- return;
- }
-
- if (!fs.existsSync(allConfigDetailsPath)) {
- throw new Error(`configuration file at ${allConfigDetailsPath} does not exist`);
- }
-
- const settingsSearchBuildId = getSettingsSearchBuildId(packageJson);
- if (!settingsSearchBuildId) {
- throw new Error('Failed to compute build number');
- }
-
- return gulp.src(allConfigDetailsPath)
- .pipe(azure.upload({
- account: process.env.AZURE_STORAGE_ACCOUNT,
- key: process.env.AZURE_STORAGE_ACCESS_KEY,
- container: 'configuration',
- prefix: `${settingsSearchBuildId}/${commit}/`
- }));
-});
-
-function shouldSetupSettingsSearch() {
- const branch = process.env.BUILD_SOURCEBRANCH;
- return branch && (/\/master$/.test(branch) || branch.indexOf('/release/') >= 0);
-}
-
-function getSettingsSearchBuildId(packageJson) {
- try {
- const branch = process.env.BUILD_SOURCEBRANCH;
- const branchId = branch.indexOf('/release/') >= 0 ? 0 :
- /\/master$/.test(branch) ? 1 :
- 2; // Some unexpected branch
-
- const out = cp.execSync(`git rev-list HEAD --count`);
- const count = parseInt(out.toString());
-
- //
- // 1.25.1, 1,234,567 commits, master = 1250112345671
- return util.versionStringToNumber(packageJson.version) * 1e8 + count * 10 + branchId;
- } catch (e) {
- throw new Error('Could not determine build number: ' + e.toString());
- }
-}
-
// This task is only run for the MacOS build
-gulp.task('generate-vscode-configuration', () => {
+const generateVSCodeConfigurationTask = task.define('generate-vscode-configuration', () => {
return new Promise((resolve, reject) => {
const buildDir = process.env['AGENT_BUILDDIRECTORY'];
if (!buildDir) {
@@ -618,3 +597,59 @@ gulp.task('generate-vscode-configuration', () => {
});
});
});
+
+const allConfigDetailsPath = path.join(os.tmpdir(), 'configuration.json');
+gulp.task(task.define(
+ 'upload-vscode-configuration',
+ task.series(
+ generateVSCodeConfigurationTask,
+ () => {
+ if (!shouldSetupSettingsSearch()) {
+ const branch = process.env.BUILD_SOURCEBRANCH;
+ console.log(`Only runs on master and release branches, not ${branch}`);
+ return;
+ }
+
+ if (!fs.existsSync(allConfigDetailsPath)) {
+ throw new Error(`configuration file at ${allConfigDetailsPath} does not exist`);
+ }
+
+ const settingsSearchBuildId = getSettingsSearchBuildId(packageJson);
+ if (!settingsSearchBuildId) {
+ throw new Error('Failed to compute build number');
+ }
+
+ return gulp.src(allConfigDetailsPath)
+ .pipe(azure.upload({
+ account: process.env.AZURE_STORAGE_ACCOUNT,
+ key: process.env.AZURE_STORAGE_ACCESS_KEY,
+ container: 'configuration',
+ prefix: `${settingsSearchBuildId}/${commit}/`
+ }));
+ }
+ )
+));
+
+function shouldSetupSettingsSearch() {
+ const branch = process.env.BUILD_SOURCEBRANCH;
+ return branch && (/\/master$/.test(branch) || branch.indexOf('/release/') >= 0);
+}
+
+function getSettingsSearchBuildId(packageJson) {
+ try {
+ const branch = process.env.BUILD_SOURCEBRANCH;
+ const branchId = branch.indexOf('/release/') >= 0 ? 0 :
+ /\/master$/.test(branch) ? 1 :
+ 2; // Some unexpected branch
+
+ const out = cp.execSync(`git rev-list HEAD --count`);
+ const count = parseInt(out.toString());
+
+ //
+ // 1.25.1, 1,234,567 commits, master = 1250112345671
+ return util.versionStringToNumber(packageJson.version) * 1e8 + count * 10 + branchId;
+ } catch (e) {
+ throw new Error('Could not determine build number: ' + e.toString());
+ }
+}
+
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
index 50258a98fb3..9b0abd18d9a 100644
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -12,9 +12,13 @@ const shell = require('gulp-shell');
const es = require('event-stream');
const vfs = require('vinyl-fs');
const util = require('./lib/util');
+const task = require('./lib/task');
const packageJson = require('../package.json');
const product = require('../product.json');
const rpmDependencies = require('../resources/linux/rpm/dependencies.json');
+const path = require('path');
+const root = path.dirname(__dirname);
+const commit = util.getVersion(root);
const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
@@ -38,7 +42,7 @@ function prepareDebPackage(arch) {
.pipe(replace('@@NAME_LONG@@', product.nameLong))
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(replace('@@ICON@@', product.applicationName))
+ .pipe(replace('@@ICON@@', product.linuxIconName))
.pipe(replace('@@URLPROTOCOL@@', product.urlProtocol));
const appdata = gulp.src('resources/linux/code.appdata.xml', { base: '.' })
@@ -48,7 +52,13 @@ function prepareDebPackage(arch) {
.pipe(rename('usr/share/appdata/' + product.applicationName + '.appdata.xml'));
const icon = gulp.src('resources/linux/code.png', { base: '.' })
- .pipe(rename('usr/share/pixmaps/' + product.applicationName + '.png'));
+ .pipe(rename('usr/share/pixmaps/' + product.linuxIconName + '.png'));
+
+ // const bash_completion = gulp.src('resources/completions/bash/code')
+ // .pipe(rename('usr/share/bash-completion/completions/code'));
+
+ // const zsh_completion = gulp.src('resources/completions/zsh/_code')
+ // .pipe(rename('usr/share/zsh/vendor-completions/_code'));
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
.pipe(rename(function (p) { p.dirname = 'usr/share/' + product.applicationName + '/' + p.dirname; }));
@@ -84,7 +94,7 @@ function prepareDebPackage(arch) {
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))
.pipe(rename('DEBIAN/postinst'));
- const all = es.merge(control, postinst, postrm, prerm, desktops, appdata, icon, code);
+ const all = es.merge(control, postinst, postrm, prerm, desktops, appdata, icon, /* bash_completion, zsh_completion, */ code);
return all.pipe(vfs.dest(destination));
};
@@ -122,7 +132,7 @@ function prepareRpmPackage(arch) {
.pipe(replace('@@NAME_LONG@@', product.nameLong))
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(replace('@@ICON@@', product.applicationName))
+ .pipe(replace('@@ICON@@', product.linuxIconName))
.pipe(replace('@@URLPROTOCOL@@', product.urlProtocol));
const appdata = gulp.src('resources/linux/code.appdata.xml', { base: '.' })
@@ -132,7 +142,13 @@ function prepareRpmPackage(arch) {
.pipe(rename('usr/share/appdata/' + product.applicationName + '.appdata.xml'));
const icon = gulp.src('resources/linux/code.png', { base: '.' })
- .pipe(rename('BUILD/usr/share/pixmaps/' + product.applicationName + '.png'));
+ .pipe(rename('BUILD/usr/share/pixmaps/' + product.linuxIconName + '.png'));
+
+ // const bash_completion = gulp.src('resources/completions/bash/code')
+ // .pipe(rename('BUILD/usr/share/bash-completion/completions/code'));
+
+ // const zsh_completion = gulp.src('resources/completions/zsh/_code')
+ // .pipe(rename('BUILD/usr/share/zsh/site-functions/_code'));
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
.pipe(rename(function (p) { p.dirname = 'BUILD/usr/share/' + product.applicationName + '/' + p.dirname; }));
@@ -140,6 +156,7 @@ function prepareRpmPackage(arch) {
const spec = gulp.src('resources/linux/rpm/code.spec.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@NAME_LONG@@', product.nameLong))
+ .pipe(replace('@@ICON@@', product.linuxIconName))
.pipe(replace('@@VERSION@@', packageJson.version))
.pipe(replace('@@RELEASE@@', linuxPackageRevision))
.pipe(replace('@@ARCHITECTURE@@', rpmArch))
@@ -154,7 +171,7 @@ function prepareRpmPackage(arch) {
const specIcon = gulp.src('resources/linux/rpm/code.xpm', { base: '.' })
.pipe(rename('SOURCES/' + product.applicationName + '.xpm'));
- const all = es.merge(code, desktops, appdata, icon, spec, specIcon);
+ const all = es.merge(code, desktops, appdata, icon, /* bash_completion, zsh_completion, */ spec, specIcon);
return all.pipe(vfs.dest(getRpmBuildPath(rpmArch)));
};
@@ -183,31 +200,33 @@ function prepareSnapPackage(arch) {
return function () {
const desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
+ .pipe(rename(`usr/share/applications/${product.applicationName}.desktop`));
+
+ const desktopUrlHandler = gulp.src('resources/linux/code-url-handler.desktop', { base: '.' })
+ .pipe(rename(`usr/share/applications/${product.applicationName}-url-handler.desktop`));
+
+ const desktops = es.merge(desktop, desktopUrlHandler)
.pipe(replace('@@NAME_LONG@@', product.nameLong))
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(replace('@@ICON@@', `/usr/share/pixmaps/${product.applicationName}.png`))
- .pipe(rename(`usr/share/applications/${product.applicationName}.desktop`));
+ .pipe(replace('@@ICON@@', `/usr/share/pixmaps/${product.linuxIconName}.png`))
+ .pipe(replace('@@URLPROTOCOL@@', product.urlProtocol));
const icon = gulp.src('resources/linux/code.png', { base: '.' })
- .pipe(rename(`usr/share/pixmaps/${product.applicationName}.png`));
+ .pipe(rename(`usr/share/pixmaps/${product.linuxIconName}.png`));
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
.pipe(rename(function (p) { p.dirname = `usr/share/${product.applicationName}/${p.dirname}`; }));
const snapcraft = gulp.src('resources/linux/snap/snapcraft.yaml', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(replace('@@VERSION@@', `${packageJson.version}-${linuxPackageRevision}`))
+ .pipe(replace('@@VERSION@@', commit.substr(0, 8)))
.pipe(rename('snap/snapcraft.yaml'));
- const snapUpdate = gulp.src('resources/linux/snap/snapUpdate.sh', { base: '.' })
- .pipe(replace('@@NAME@@', product.applicationName))
- .pipe(rename(`usr/share/${product.applicationName}/snapUpdate.sh`));
-
const electronLaunch = gulp.src('resources/linux/snap/electron-launch', { base: '.' })
.pipe(rename('electron-launch'));
- const all = es.merge(desktop, icon, code, snapcraft, electronLaunch, snapUpdate);
+ const all = es.merge(desktops, icon, code, snapcraft, electronLaunch);
return all.pipe(vfs.dest(destination));
};
@@ -218,42 +237,36 @@ function buildSnapPackage(arch) {
return shell.task(`cd ${snapBuildPath} && snapcraft build`);
}
-gulp.task('clean-vscode-linux-ia32-deb', util.rimraf('.build/linux/deb/i386'));
-gulp.task('clean-vscode-linux-x64-deb', util.rimraf('.build/linux/deb/amd64'));
-gulp.task('clean-vscode-linux-arm-deb', util.rimraf('.build/linux/deb/armhf'));
-gulp.task('clean-vscode-linux-arm64-deb', util.rimraf('.build/linux/deb/arm64'));
-gulp.task('clean-vscode-linux-ia32-rpm', util.rimraf('.build/linux/rpm/i386'));
-gulp.task('clean-vscode-linux-x64-rpm', util.rimraf('.build/linux/rpm/x86_64'));
-gulp.task('clean-vscode-linux-arm-rpm', util.rimraf('.build/linux/rpm/armhf'));
-gulp.task('clean-vscode-linux-arm64-rpm', util.rimraf('.build/linux/rpm/arm64'));
-gulp.task('clean-vscode-linux-ia32-snap', util.rimraf('.build/linux/snap/x64'));
-gulp.task('clean-vscode-linux-x64-snap', util.rimraf('.build/linux/snap/x64'));
-gulp.task('clean-vscode-linux-arm-snap', util.rimraf('.build/linux/snap/x64'));
-gulp.task('clean-vscode-linux-arm64-snap', util.rimraf('.build/linux/snap/x64'));
+const BUILD_TARGETS = [
+ { arch: 'ia32' },
+ { arch: 'x64' },
+ { arch: 'arm' },
+ { arch: 'arm64' },
+];
-gulp.task('vscode-linux-ia32-prepare-deb', ['clean-vscode-linux-ia32-deb'], prepareDebPackage('ia32'));
-gulp.task('vscode-linux-x64-prepare-deb', ['clean-vscode-linux-x64-deb'], prepareDebPackage('x64'));
-gulp.task('vscode-linux-arm-prepare-deb', ['clean-vscode-linux-arm-deb'], prepareDebPackage('arm'));
-gulp.task('vscode-linux-arm64-prepare-deb', ['clean-vscode-linux-arm64-deb'], prepareDebPackage('arm64'));
-gulp.task('vscode-linux-ia32-build-deb', ['vscode-linux-ia32-prepare-deb'], buildDebPackage('ia32'));
-gulp.task('vscode-linux-x64-build-deb', ['vscode-linux-x64-prepare-deb'], buildDebPackage('x64'));
-gulp.task('vscode-linux-arm-build-deb', ['vscode-linux-arm-prepare-deb'], buildDebPackage('arm'));
-gulp.task('vscode-linux-arm64-build-deb', ['vscode-linux-arm64-prepare-deb'], buildDebPackage('arm64'));
+BUILD_TARGETS.forEach((buildTarget) => {
+ const arch = buildTarget.arch;
-gulp.task('vscode-linux-ia32-prepare-rpm', ['clean-vscode-linux-ia32-rpm'], prepareRpmPackage('ia32'));
-gulp.task('vscode-linux-x64-prepare-rpm', ['clean-vscode-linux-x64-rpm'], prepareRpmPackage('x64'));
-gulp.task('vscode-linux-arm-prepare-rpm', ['clean-vscode-linux-arm-rpm'], prepareRpmPackage('arm'));
-gulp.task('vscode-linux-arm64-prepare-rpm', ['clean-vscode-linux-arm64-rpm'], prepareRpmPackage('arm64'));
-gulp.task('vscode-linux-ia32-build-rpm', ['vscode-linux-ia32-prepare-rpm'], buildRpmPackage('ia32'));
-gulp.task('vscode-linux-x64-build-rpm', ['vscode-linux-x64-prepare-rpm'], buildRpmPackage('x64'));
-gulp.task('vscode-linux-arm-build-rpm', ['vscode-linux-arm-prepare-rpm'], buildRpmPackage('arm'));
-gulp.task('vscode-linux-arm64-build-rpm', ['vscode-linux-arm64-prepare-rpm'], buildRpmPackage('arm64'));
+ {
+ const debArch = getDebPackageArch(arch);
+ const prepareDebTask = task.define(`vscode-linux-${arch}-prepare-deb`, task.series(util.rimraf(`.build/linux/deb/${debArch}`), prepareDebPackage(arch)));
+ // gulp.task(prepareDebTask);
+ const buildDebTask = task.define(`vscode-linux-${arch}-build-deb`, task.series(prepareDebTask, buildDebPackage(arch)));
+ gulp.task(buildDebTask);
+ }
-gulp.task('vscode-linux-ia32-prepare-snap', ['clean-vscode-linux-ia32-snap'], prepareSnapPackage('ia32'));
-gulp.task('vscode-linux-x64-prepare-snap', ['clean-vscode-linux-x64-snap'], prepareSnapPackage('x64'));
-gulp.task('vscode-linux-arm-prepare-snap', ['clean-vscode-linux-arm-snap'], prepareSnapPackage('arm'));
-gulp.task('vscode-linux-arm64-prepare-snap', ['clean-vscode-linux-arm64-snap'], prepareSnapPackage('arm64'));
-gulp.task('vscode-linux-ia32-build-snap', ['vscode-linux-ia32-prepare-snap'], buildSnapPackage('ia32'));
-gulp.task('vscode-linux-x64-build-snap', ['vscode-linux-x64-prepare-snap'], buildSnapPackage('x64'));
-gulp.task('vscode-linux-arm-build-snap', ['vscode-linux-arm-prepare-snap'], buildSnapPackage('arm'));
-gulp.task('vscode-linux-arm64-build-snap', ['vscode-linux-arm64-prepare-snap'], buildSnapPackage('arm64'));
+ {
+ const rpmArch = getRpmPackageArch(arch);
+ const prepareRpmTask = task.define(`vscode-linux-${arch}-prepare-rpm`, task.series(util.rimraf(`.build/linux/rpm/${rpmArch}`), prepareRpmPackage(arch)));
+ // gulp.task(prepareRpmTask);
+ const buildRpmTask = task.define(`vscode-linux-${arch}-build-rpm`, task.series(prepareRpmTask, buildRpmPackage(arch)));
+ gulp.task(buildRpmTask);
+ }
+
+ {
+ const prepareSnapTask = task.define(`vscode-linux-${arch}-prepare-snap`, task.series(util.rimraf(`.build/linux/snap/${arch}`), prepareSnapPackage(arch)));
+ gulp.task(prepareSnapTask);
+ const buildSnapTask = task.define(`vscode-linux-${arch}-build-snap`, task.series(prepareSnapTask, buildSnapPackage(arch)));
+ gulp.task(buildSnapTask);
+ }
+});
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
index 1cfc5b4c4f7..46543316de9 100644
--- a/build/gulpfile.vscode.win32.js
+++ b/build/gulpfile.vscode.win32.js
@@ -12,6 +12,7 @@ const assert = require('assert');
const cp = require('child_process');
const _7z = require('7zip')['7z'];
const util = require('./lib/util');
+const task = require('./lib/task');
const pkg = require('../package.json');
const product = require('../product.json');
const vfs = require('vinyl-fs');
@@ -105,8 +106,8 @@ function buildWin32Setup(arch, target) {
}
function defineWin32SetupTasks(arch, target) {
- gulp.task(`clean-vscode-win32-${arch}-${target}-setup`, util.rimraf(setupDir(arch, target)));
- gulp.task(`vscode-win32-${arch}-${target}-setup`, [`clean-vscode-win32-${arch}-${target}-setup`], buildWin32Setup(arch, target));
+ const cleanTask = util.rimraf(setupDir(arch, target));
+ gulp.task(task.define(`vscode-win32-${arch}-${target}-setup`, task.series(cleanTask, buildWin32Setup(arch, target))));
}
defineWin32SetupTasks('ia32', 'system');
@@ -124,11 +125,8 @@ function archiveWin32Setup(arch) {
};
}
-gulp.task('clean-vscode-win32-ia32-archive', util.rimraf(zipDir('ia32')));
-gulp.task('vscode-win32-ia32-archive', ['clean-vscode-win32-ia32-archive'], archiveWin32Setup('ia32'));
-
-gulp.task('clean-vscode-win32-x64-archive', util.rimraf(zipDir('x64')));
-gulp.task('vscode-win32-x64-archive', ['clean-vscode-win32-x64-archive'], archiveWin32Setup('x64'));
+gulp.task(task.define('vscode-win32-ia32-archive', task.series(util.rimraf(zipDir('ia32')), archiveWin32Setup('ia32'))));
+gulp.task(task.define('vscode-win32-x64-archive', task.series(util.rimraf(zipDir('x64')), archiveWin32Setup('x64'))));
function copyInnoUpdater(arch) {
return () => {
@@ -137,9 +135,6 @@ function copyInnoUpdater(arch) {
};
}
-gulp.task('vscode-win32-ia32-copy-inno-updater', copyInnoUpdater('ia32'));
-gulp.task('vscode-win32-x64-copy-inno-updater', copyInnoUpdater('x64'));
-
function patchInnoUpdater(arch) {
return cb => {
const icon = path.join(repoPath, 'resources', 'win32', 'code.ico');
@@ -147,5 +142,5 @@ function patchInnoUpdater(arch) {
};
}
-gulp.task('vscode-win32-ia32-inno-updater', ['vscode-win32-ia32-copy-inno-updater'], patchInnoUpdater('ia32'));
-gulp.task('vscode-win32-x64-inno-updater', ['vscode-win32-x64-copy-inno-updater'], patchInnoUpdater('x64'));
\ No newline at end of file
+gulp.task(task.define('vscode-win32-ia32-inno-updater', task.series(copyInnoUpdater('ia32'), patchInnoUpdater('ia32'))));
+gulp.task(task.define('vscode-win32-x64-inno-updater', task.series(copyInnoUpdater('x64'), patchInnoUpdater('x64'))));
\ No newline at end of file
diff --git a/build/lib/builtInExtensions.js b/build/lib/builtInExtensions.js
index c5797c78b61..a687bbccb4c 100644
--- a/build/lib/builtInExtensions.js
+++ b/build/lib/builtInExtensions.js
@@ -14,7 +14,8 @@ const es = require('event-stream');
const rename = require('gulp-rename');
const vfs = require('vinyl-fs');
const ext = require('./extensions');
-const util = require('gulp-util');
+const fancyLog = require('fancy-log');
+const ansiColors = require('ansi-colors');
const root = path.dirname(path.dirname(__dirname));
const builtInExtensions = require('../builtInExtensions.json');
@@ -43,7 +44,7 @@ function isUpToDate(extension) {
function syncMarketplaceExtension(extension) {
if (isUpToDate(extension)) {
- util.log(util.colors.blue('[marketplace]'), `${extension.name}@${extension.version}`, util.colors.green('✔︎'));
+ fancyLog(ansiColors.blue('[marketplace]'), `${extension.name}@${extension.version}`, ansiColors.green('✔︎'));
return es.readArray([]);
}
@@ -52,13 +53,13 @@ function syncMarketplaceExtension(extension) {
return ext.fromMarketplace(extension.name, extension.version, extension.metadata)
.pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`))
.pipe(vfs.dest('.build/builtInExtensions'))
- .on('end', () => util.log(util.colors.blue('[marketplace]'), extension.name, util.colors.green('✔︎')));
+ .on('end', () => fancyLog(ansiColors.blue('[marketplace]'), extension.name, ansiColors.green('✔︎')));
}
function syncExtension(extension, controlState) {
switch (controlState) {
case 'disabled':
- util.log(util.colors.blue('[disabled]'), util.colors.gray(extension.name));
+ fancyLog(ansiColors.blue('[disabled]'), ansiColors.gray(extension.name));
return es.readArray([]);
case 'marketplace':
@@ -66,15 +67,15 @@ function syncExtension(extension, controlState) {
default:
if (!fs.existsSync(controlState)) {
- util.log(util.colors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but that path does not exist.`));
+ fancyLog(ansiColors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but that path does not exist.`));
return es.readArray([]);
} else if (!fs.existsSync(path.join(controlState, 'package.json'))) {
- util.log(util.colors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but there is no 'package.json' file in that directory.`));
+ fancyLog(ansiColors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but there is no 'package.json' file in that directory.`));
return es.readArray([]);
}
- util.log(util.colors.blue('[local]'), `${extension.name}: ${util.colors.cyan(controlState)}`, util.colors.green('✔︎'));
+ fancyLog(ansiColors.blue('[local]'), `${extension.name}: ${ansiColors.cyan(controlState)}`, ansiColors.green('✔︎'));
return es.readArray([]);
}
}
@@ -93,8 +94,8 @@ function writeControlFile(control) {
}
function main() {
- util.log('Syncronizing built-in extensions...');
- util.log(`You can manage built-in extensions with the ${util.colors.cyan('--builtin')} flag`);
+ fancyLog('Syncronizing built-in extensions...');
+ fancyLog(`You can manage built-in extensions with the ${ansiColors.cyan('--builtin')} flag`);
const control = readControlFile();
const streams = [];
diff --git a/build/lib/compilation.js b/build/lib/compilation.js
index 9cc9846336a..592a5d087ce 100644
--- a/build/lib/compilation.js
+++ b/build/lib/compilation.js
@@ -16,7 +16,8 @@ const monacodts = require("../monaco/api");
const nls = require("./nls");
const reporter_1 = require("./reporter");
const util = require("./util");
-const util2 = require("gulp-util");
+const fancyLog = require("fancy-log");
+const ansiColors = require("ansi-colors");
const watch = require('./watch');
const reporter = reporter_1.createReporter();
function getTypeScriptCompilerOptions(src) {
@@ -126,6 +127,20 @@ class MonacoGenerator {
this._declarationResolver.invalidateCache(moduleId);
this._executeSoon();
});
+ watcher.addListener('error', (err) => {
+ console.error(`Encountered error while watching ${filePath}.`);
+ console.log(err);
+ delete this._watchedFiles[filePath];
+ for (let i = 0; i < this._watchers.length; i++) {
+ if (this._watchers[i] === watcher) {
+ this._watchers.splice(i, 1);
+ break;
+ }
+ }
+ watcher.close();
+ this._declarationResolver.invalidateCache(moduleId);
+ this._executeSoon();
+ });
this._watchers.push(watcher);
};
this._fsProvider = new class extends monacodts.FSProvider {
@@ -165,7 +180,7 @@ class MonacoGenerator {
return r;
}
_log(message, ...rest) {
- util2.log(util2.colors.cyan('[monaco.d.ts]'), message, ...rest);
+ fancyLog(ansiColors.cyan('[monaco.d.ts]'), message, ...rest);
}
execute() {
const startTime = Date.now();
diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts
index 393bc56bd16..b431a134f6c 100644
--- a/build/lib/compilation.ts
+++ b/build/lib/compilation.ts
@@ -17,7 +17,9 @@ import * as monacodts from '../monaco/api';
import * as nls from './nls';
import { createReporter } from './reporter';
import * as util from './util';
-import * as util2 from 'gulp-util';
+import * as fancyLog from 'fancy-log';
+import * as ansiColors from 'ansi-colors';
+
const watch = require('./watch');
const reporter = createReporter();
@@ -159,6 +161,20 @@ class MonacoGenerator {
this._declarationResolver.invalidateCache(moduleId);
this._executeSoon();
});
+ watcher.addListener('error', (err) => {
+ console.error(`Encountered error while watching ${filePath}.`);
+ console.log(err);
+ delete this._watchedFiles[filePath];
+ for (let i = 0; i < this._watchers.length; i++) {
+ if (this._watchers[i] === watcher) {
+ this._watchers.splice(i, 1);
+ break;
+ }
+ }
+ watcher.close();
+ this._declarationResolver.invalidateCache(moduleId);
+ this._executeSoon();
+ });
this._watchers.push(watcher);
};
this._fsProvider = new class extends monacodts.FSProvider {
@@ -204,7 +220,7 @@ class MonacoGenerator {
}
private _log(message: any, ...rest: any[]): void {
- util2.log(util2.colors.cyan('[monaco.d.ts]'), message, ...rest);
+ fancyLog(ansiColors.cyan('[monaco.d.ts]'), message, ...rest);
}
public execute(): void {
diff --git a/build/lib/extensions.js b/build/lib/extensions.js
index 994d1336e6b..18c668d6432 100644
--- a/build/lib/extensions.js
+++ b/build/lib/extensions.js
@@ -17,7 +17,8 @@ const remote = require("gulp-remote-src");
const vzip = require('gulp-vinyl-zip');
const filter = require("gulp-filter");
const rename = require("gulp-rename");
-const util = require('gulp-util');
+const fancyLog = require("fancy-log");
+const ansiColors = require("ansi-colors");
const buffer = require('gulp-buffer');
const json = require("gulp-json-editor");
const webpack = require('webpack');
@@ -79,7 +80,7 @@ function fromLocalWebpack(extensionPath, sourceMappingURLBase) {
.pipe(packageJsonFilter.restore);
const webpackStreams = webpackConfigLocations.map(webpackConfigPath => () => {
const webpackDone = (err, stats) => {
- util.log(`Bundled extension: ${util.colors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`);
+ fancyLog(`Bundled extension: ${ansiColors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`);
if (err) {
result.emit('error', err);
}
@@ -157,7 +158,7 @@ const baseHeaders = {
function fromMarketplace(extensionName, version, metadata) {
const [publisher, name] = extensionName.split('.');
const url = `https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${name}/${version}/vspackage`;
- util.log('Downloading extension:', util.colors.yellow(`${extensionName}@${version}`), '...');
+ fancyLog('Downloading extension:', ansiColors.yellow(`${extensionName}@${version}`), '...');
const options = {
base: url,
requestOptions: {
@@ -179,6 +180,7 @@ exports.fromMarketplace = fromMarketplace;
const excludedExtensions = [
'vscode-api-tests',
'vscode-colorize-tests',
+ 'vscode-test-resolver',
'ms-vscode.node-debug',
'ms-vscode.node-debug2',
];
diff --git a/build/lib/extensions.ts b/build/lib/extensions.ts
index 844b711a829..188deaf1a1f 100644
--- a/build/lib/extensions.ts
+++ b/build/lib/extensions.ts
@@ -17,7 +17,8 @@ import remote = require('gulp-remote-src');
const vzip = require('gulp-vinyl-zip');
import filter = require('gulp-filter');
import rename = require('gulp-rename');
-const util = require('gulp-util');
+import * as fancyLog from 'fancy-log';
+import * as ansiColors from 'ansi-colors';
const buffer = require('gulp-buffer');
import json = require('gulp-json-editor');
const webpack = require('webpack');
@@ -93,7 +94,7 @@ function fromLocalWebpack(extensionPath: string, sourceMappingURLBase: string |
const webpackStreams = webpackConfigLocations.map(webpackConfigPath => () => {
const webpackDone = (err: any, stats: any) => {
- util.log(`Bundled extension: ${util.colors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`);
+ fancyLog(`Bundled extension: ${ansiColors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`);
if (err) {
result.emit('error', err);
}
@@ -187,7 +188,7 @@ export function fromMarketplace(extensionName: string, version: string, metadata
const [publisher, name] = extensionName.split('.');
const url = `https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${name}/${version}/vspackage`;
- util.log('Downloading extension:', util.colors.yellow(`${extensionName}@${version}`), '...');
+ fancyLog('Downloading extension:', ansiColors.yellow(`${extensionName}@${version}`), '...');
const options = {
base: url,
@@ -220,6 +221,7 @@ interface IPackageExtensionsOptions {
const excludedExtensions = [
'vscode-api-tests',
'vscode-colorize-tests',
+ 'vscode-test-resolver',
'ms-vscode.node-debug',
'ms-vscode.node-debug2',
];
diff --git a/build/lib/git.js b/build/lib/git.js
index 29da49fdd84..da5d66fd8d2 100644
--- a/build/lib/git.js
+++ b/build/lib/git.js
@@ -17,14 +17,14 @@ function getVersion(repo) {
head = fs.readFileSync(headPath, 'utf8').trim();
}
catch (e) {
- return void 0;
+ return undefined;
}
if (/^[0-9a-f]{40}$/i.test(head)) {
return head;
}
const refMatch = /^ref: (.*)$/.exec(head);
if (!refMatch) {
- return void 0;
+ return undefined;
}
const ref = refMatch[1];
const refPath = path.join(git, ref);
@@ -40,7 +40,7 @@ function getVersion(repo) {
refsRaw = fs.readFileSync(packedRefsPath, 'utf8').trim();
}
catch (e) {
- return void 0;
+ return undefined;
}
const refsRegex = /^([0-9a-f]{40})\s+(.+)$/gm;
let refsMatch;
diff --git a/build/lib/git.ts b/build/lib/git.ts
index 482c39e9af1..dc9c667c21b 100644
--- a/build/lib/git.ts
+++ b/build/lib/git.ts
@@ -18,7 +18,7 @@ export function getVersion(repo: string): string | undefined {
try {
head = fs.readFileSync(headPath, 'utf8').trim();
} catch (e) {
- return void 0;
+ return undefined;
}
if (/^[0-9a-f]{40}$/i.test(head)) {
@@ -28,7 +28,7 @@ export function getVersion(repo: string): string | undefined {
const refMatch = /^ref: (.*)$/.exec(head);
if (!refMatch) {
- return void 0;
+ return undefined;
}
const ref = refMatch[1];
@@ -46,7 +46,7 @@ export function getVersion(repo: string): string | undefined {
try {
refsRaw = fs.readFileSync(packedRefsPath, 'utf8').trim();
} catch (e) {
- return void 0;
+ return undefined;
}
const refsRegex = /^([0-9a-f]{40})\s+(.+)$/gm;
diff --git a/build/lib/i18n.js b/build/lib/i18n.js
index e026eaacb3e..c40b2988e28 100644
--- a/build/lib/i18n.js
+++ b/build/lib/i18n.js
@@ -13,15 +13,16 @@ const xml2js = require("xml2js");
const glob = require("glob");
const https = require("https");
const gulp = require("gulp");
-const util = require("gulp-util");
+const fancyLog = require("fancy-log");
+const ansiColors = require("ansi-colors");
const iconv = require("iconv-lite");
const NUMBER_OF_CONCURRENT_DOWNLOADS = 4;
function log(message, ...rest) {
- util.log(util.colors.green('[i18n]'), message, ...rest);
+ fancyLog(ansiColors.green('[i18n]'), message, ...rest);
}
exports.defaultLanguages = [
- { id: 'zh-tw', folderName: 'cht', transifexId: 'zh-hant' },
- { id: 'zh-cn', folderName: 'chs', transifexId: 'zh-hans' },
+ { id: 'zh-tw', folderName: 'cht', translationId: 'zh-hant' },
+ { id: 'zh-cn', folderName: 'chs', translationId: 'zh-hans' },
{ id: 'ja', folderName: 'jpn' },
{ id: 'ko', folderName: 'kor' },
{ id: 'de', folderName: 'deu' },
@@ -37,7 +38,7 @@ exports.extraLanguages = [
{ id: 'tr', folderName: 'trk' }
];
// non built-in extensions also that are transifex and need to be part of the language packs
-const externalExtensionsWithTranslations = {
+exports.externalExtensionsWithTranslations = {
'vscode-chrome-debug': 'msjsdiag.debugger-for-chrome',
'vscode-node-debug': 'ms-vscode.node-debug',
'vscode-node-debug2': 'ms-vscode.node-debug2'
@@ -229,12 +230,15 @@ XLF.parse = function (xlfString) {
if (!unit.target) {
return; // No translation available
}
- const val = unit.target.toString();
+ let val = unit.target[0];
+ if (typeof val !== 'string') {
+ val = val._;
+ }
if (key && val) {
messages[key] = decodeEntities(val);
}
else {
- reject(new Error(`XLF parsing error: XLIFF file does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.`));
+ reject(new Error(`XLF parsing error: XLIFF file ${originalFilePath} does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.`));
}
});
files.push({ messages: messages, originalFilePath: originalFilePath, language: language.toLowerCase() });
@@ -368,7 +372,11 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
}
});
});
- let languageDirectory = path.join(__dirname, '..', '..', 'i18n');
+ let languageDirectory = path.join(__dirname, '..', '..', '..', 'vscode-loc', 'i18n');
+ if (!fs.existsSync(languageDirectory)) {
+ log(`No VS Code localization repository found. Looking at ${languageDirectory}`);
+ log(`To bundle translations please check out the vscode-loc repository as a sibling of the vscode repository.`);
+ }
let sortedLanguages = sortLanguages(languages);
sortedLanguages.forEach((language) => {
if (process.env['VSCODE_BUILD_VERBOSE']) {
@@ -376,22 +384,25 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
}
statistics[language.id] = 0;
let localizedModules = Object.create(null);
- let languageFolderName = language.folderName || language.id;
- let cwd = path.join(languageDirectory, languageFolderName, 'src');
+ let languageFolderName = language.translationId || language.id;
+ let i18nFile = path.join(languageDirectory, `vscode-language-pack-${languageFolderName}`, 'translations', 'main.i18n.json');
+ let allMessages;
+ if (fs.existsSync(i18nFile)) {
+ let content = stripComments(fs.readFileSync(i18nFile, 'utf8'));
+ allMessages = JSON.parse(content);
+ }
modules.forEach((module) => {
let order = keysSection[module];
- let i18nFile = path.join(cwd, module) + '.i18n.json';
- let messages = null;
- if (fs.existsSync(i18nFile)) {
- let content = stripComments(fs.readFileSync(i18nFile, 'utf8'));
- messages = JSON.parse(content);
+ let moduleMessage;
+ if (allMessages) {
+ moduleMessage = allMessages.contents[module];
}
- else {
+ if (!moduleMessage) {
if (process.env['VSCODE_BUILD_VERBOSE']) {
log(`No localized messages found for module ${module}. Using default messages.`);
}
- messages = defaultMessages[module];
- statistics[language.id] = statistics[language.id] + Object.keys(messages).length;
+ moduleMessage = defaultMessages[module];
+ statistics[language.id] = statistics[language.id] + Object.keys(moduleMessage).length;
}
let localizedMessages = [];
order.forEach((keyInfo) => {
@@ -402,7 +413,7 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
else {
key = keyInfo.key;
}
- let message = messages[key];
+ let message = moduleMessage[key];
if (!message) {
if (process.env['VSCODE_BUILD_VERBOSE']) {
log(`No localized message found for key ${key} in module ${module}. Using default message.`);
@@ -485,7 +496,7 @@ function getResource(sourceFile) {
else if (/^vs\/code/.test(sourceFile)) {
return { name: 'vs/code', project: workbenchProject };
}
- else if (/^vs\/workbench\/parts/.test(sourceFile)) {
+ else if (/^vs\/workbench\/contrib/.test(sourceFile)) {
resource = sourceFile.split('/', 4).join('/');
return { name: resource, project: workbenchProject };
}
@@ -569,7 +580,7 @@ function createXlfFilesForExtensions() {
}
return _xlf;
}
- gulp.src([`./extensions/${extensionName}/package.nls.json`, `./extensions/${extensionName}/**/nls.metadata.json`]).pipe(event_stream_1.through(function (file) {
+ gulp.src([`./extensions/${extensionName}/package.nls.json`, `./extensions/${extensionName}/**/nls.metadata.json`], { allowEmpty: true }).pipe(event_stream_1.through(function (file) {
if (file.isBuffer()) {
const buffer = file.contents;
const basename = path.basename(file.path);
@@ -743,7 +754,7 @@ function getAllResources(project, apiHostname, username, password) {
}
function findObsoleteResources(apiHostname, username, password) {
let resourcesByProject = Object.create(null);
- resourcesByProject[extensionsProject] = [].concat(externalExtensionsWithTranslations); // clone
+ resourcesByProject[extensionsProject] = [].concat(exports.externalExtensionsWithTranslations); // clone
return event_stream_1.through(function (file) {
const project = path.dirname(file.relative);
const fileName = path.basename(file.path);
@@ -946,7 +957,7 @@ function retrieveResource(language, resource, apiHostname, credentials) {
return limiter.queue(() => new Promise((resolve, reject) => {
const slug = resource.name.replace(/\//g, '_');
const project = resource.project;
- let transifexLanguageId = language.id === 'ps' ? 'en' : language.transifexId || language.id;
+ let transifexLanguageId = language.id === 'ps' ? 'en' : language.translationId || language.id;
const options = {
hostname: apiHostname,
path: `/api/2/project/${project}/resource/${slug}/translation/${transifexLanguageId}?file&mode=onlyreviewed`,
@@ -1019,17 +1030,18 @@ function createI18nFile(originalFilePath, messages) {
}
const i18nPackVersion = "1.0.0";
function pullI18nPackFiles(apiHostname, username, password, language, resultingTranslationPaths) {
- return pullCoreAndExtensionsXlfFiles(apiHostname, username, password, language, externalExtensionsWithTranslations)
- .pipe(prepareI18nPackFiles(externalExtensionsWithTranslations, resultingTranslationPaths, language.id === 'ps'));
+ return pullCoreAndExtensionsXlfFiles(apiHostname, username, password, language, exports.externalExtensionsWithTranslations)
+ .pipe(prepareI18nPackFiles(exports.externalExtensionsWithTranslations, resultingTranslationPaths, language.id === 'ps'));
}
exports.pullI18nPackFiles = pullI18nPackFiles;
function prepareI18nPackFiles(externalExtensions, resultingTranslationPaths, pseudo = false) {
let parsePromises = [];
let mainPack = { version: i18nPackVersion, contents: {} };
let extensionsPacks = {};
+ let errors = [];
return event_stream_1.through(function (xlf) {
- let project = path.dirname(xlf.path);
- let resource = path.basename(xlf.path, '.xlf');
+ let project = path.basename(path.dirname(xlf.relative));
+ let resource = path.basename(xlf.relative, '.xlf');
let contents = xlf.contents.toString();
let parsePromise = pseudo ? XLF.parsePseudo(contents) : XLF.parse(contents);
parsePromises.push(parsePromise);
@@ -1055,10 +1067,15 @@ function prepareI18nPackFiles(externalExtensions, resultingTranslationPaths, pse
mainPack.contents[path.substr(firstSlash + 1)] = file.messages;
}
});
+ }).catch(reason => {
+ errors.push(reason);
});
}, function () {
Promise.all(parsePromises)
.then(() => {
+ if (errors.length > 0) {
+ throw errors;
+ }
const translatedMainFile = createI18nFile('./main', mainPack);
resultingTranslationPaths.push({ id: 'vscode', resourceName: 'main.i18n.json' });
this.queue(translatedMainFile);
@@ -1075,7 +1092,9 @@ function prepareI18nPackFiles(externalExtensions, resultingTranslationPaths, pse
}
this.queue(null);
})
- .catch(reason => { throw new Error(reason); });
+ .catch((reason) => {
+ this.emit('error', reason);
+ });
});
}
exports.prepareI18nPackFiles = prepareI18nPackFiles;
@@ -1093,11 +1112,15 @@ function prepareIslFiles(language, innoSetupConfig) {
let translatedFile = createIslFile(file.originalFilePath, file.messages, language, innoSetupConfig);
stream.queue(translatedFile);
});
+ }).catch(reason => {
+ this.emit('error', reason);
});
}, function () {
Promise.all(parsePromises)
.then(() => { this.queue(null); })
- .catch(reason => { throw new Error(reason); });
+ .catch(reason => {
+ this.emit('error', reason);
+ });
});
}
exports.prepareIslFiles = prepareIslFiles;
diff --git a/build/lib/i18n.resources.json b/build/lib/i18n.resources.json
index 296d1286fbb..ac557db625e 100644
--- a/build/lib/i18n.resources.json
+++ b/build/lib/i18n.resources.json
@@ -27,135 +27,155 @@
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/cli",
+ "name": "vs/workbench/api/common",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/codeEditor",
+ "name": "vs/workbench/contrib/cli",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/comments",
+ "name": "vs/workbench/contrib/codeEditor",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/debug",
+ "name": "vs/workbench/contrib/codeinset",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/emmet",
+ "name": "vs/workbench/contrib/callHierarchy",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/execution",
+ "name": "vs/workbench/contrib/comments",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/extensions",
+ "name": "vs/workbench/contrib/debug",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/feedback",
+ "name": "vs/workbench/contrib/emmet",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/files",
+ "name": "vs/workbench/contrib/extensions",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/html",
+ "name": "vs/workbench/contrib/externalTerminal",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/markers",
+ "name": "vs/workbench/contrib/feedback",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/localizations",
+ "name": "vs/workbench/contrib/files",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/logs",
+ "name": "vs/workbench/contrib/html",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/output",
+ "name": "vs/workbench/contrib/issue",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/performance",
+ "name": "vs/workbench/contrib/markers",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/preferences",
+ "name": "vs/workbench/contrib/localizations",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/quickopen",
+ "name": "vs/workbench/contrib/logs",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/relauncher",
+ "name": "vs/workbench/contrib/output",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/scm",
+ "name": "vs/workbench/contrib/performance",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/search",
+ "name": "vs/workbench/contrib/preferences",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/snippets",
+ "name": "vs/workbench/contrib/quickopen",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/stats",
+ "name": "vs/workbench/contrib/relauncher",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/surveys",
+ "name": "vs/workbench/contrib/scm",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/tasks",
+ "name": "vs/workbench/contrib/search",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/terminal",
+ "name": "vs/workbench/contrib/snippets",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/themes",
+ "name": "vs/workbench/contrib/format",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/trust",
+ "name": "vs/workbench/contrib/stats",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/update",
+ "name": "vs/workbench/contrib/surveys",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/url",
+ "name": "vs/workbench/contrib/tasks",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/watermark",
+ "name": "vs/workbench/contrib/terminal",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/webview",
+ "name": "vs/workbench/contrib/themes",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/welcome",
+ "name": "vs/workbench/contrib/trust",
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/parts/outline",
+ "name": "vs/workbench/contrib/update",
+ "project": "vscode-workbench"
+ },
+ {
+ "name": "vs/workbench/contrib/url",
+ "project": "vscode-workbench"
+ },
+ {
+ "name": "vs/workbench/contrib/watermark",
+ "project": "vscode-workbench"
+ },
+ {
+ "name": "vs/workbench/contrib/webview",
+ "project": "vscode-workbench"
+ },
+ {
+ "name": "vs/workbench/contrib/welcome",
+ "project": "vscode-workbench"
+ },
+ {
+ "name": "vs/workbench/contrib/outline",
"project": "vscode-workbench"
},
{
@@ -195,13 +215,17 @@
"project": "vscode-workbench"
},
{
- "name": "vs/workbench/services/jsonschemas",
+ "name": "vs/workbench/services/extensionManagement",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/services/files",
"project": "vscode-workbench"
},
+ {
+ "name": "vs/workbench/services/integrity",
+ "project": "vscode-workbench"
+ },
{
"name": "vs/workbench/services/keybinding",
"project": "vscode-workbench"
@@ -238,6 +262,10 @@
"name": "vs/workbench/services/decorations",
"project": "vscode-workbench"
},
+ {
+ "name": "vs/workbench/services/label",
+ "project": "vscode-workbench"
+ },
{
"name": "vs/workbench/services/preferences",
"project": "vscode-preferences"
diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts
index 26e512d95b6..ee75ac1ec01 100644
--- a/build/lib/i18n.ts
+++ b/build/lib/i18n.ts
@@ -13,19 +13,19 @@ import * as xml2js from 'xml2js';
import * as glob from 'glob';
import * as https from 'https';
import * as gulp from 'gulp';
-
-import * as util from 'gulp-util';
+import * as fancyLog from 'fancy-log';
+import * as ansiColors from 'ansi-colors';
import * as iconv from 'iconv-lite';
const NUMBER_OF_CONCURRENT_DOWNLOADS = 4;
function log(message: any, ...rest: any[]): void {
- util.log(util.colors.green('[i18n]'), message, ...rest);
+ fancyLog(ansiColors.green('[i18n]'), message, ...rest);
}
export interface Language {
- id: string; // laguage id, e.g. zh-tw, de
- transifexId?: string; // language id used in transifex, e.g zh-hant, de (optional, if not set, the id is used)
+ id: string; // language id, e.g. zh-tw, de
+ translationId?: string; // language id used in translation tools, e.g zh-hant, de (optional, if not set, the id is used)
folderName?: string; // language specific folder name, e.g. cht, deu (optional, if not set, the id is used)
}
@@ -38,8 +38,8 @@ export interface InnoSetup {
}
export const defaultLanguages: Language[] = [
- { id: 'zh-tw', folderName: 'cht', transifexId: 'zh-hant' },
- { id: 'zh-cn', folderName: 'chs', transifexId: 'zh-hans' },
+ { id: 'zh-tw', folderName: 'cht', translationId: 'zh-hant' },
+ { id: 'zh-cn', folderName: 'chs', translationId: 'zh-hans' },
{ id: 'ja', folderName: 'jpn' },
{ id: 'ko', folderName: 'kor' },
{ id: 'de', folderName: 'deu' },
@@ -57,7 +57,7 @@ export const extraLanguages: Language[] = [
];
// non built-in extensions also that are transifex and need to be part of the language packs
-const externalExtensionsWithTranslations = {
+export const externalExtensionsWithTranslations = {
'vscode-chrome-debug': 'msjsdiag.debugger-for-chrome',
'vscode-node-debug': 'ms-vscode.node-debug',
'vscode-node-debug2': 'ms-vscode.node-debug2'
@@ -144,6 +144,15 @@ interface BundledExtensionFormat {
};
}
+interface I18nFormat {
+ version: string;
+ contents: {
+ [module: string]: {
+ [messageKey: string]: string;
+ };
+ };
+}
+
export class Line {
private buffer: string[] = [];
@@ -325,11 +334,14 @@ export class XLF {
return; // No translation available
}
- const val = unit.target.toString();
+ let val = unit.target[0];
+ if (typeof val !== 'string') {
+ val = val._;
+ }
if (key && val) {
messages[key] = decodeEntities(val);
} else {
- reject(new Error(`XLF parsing error: XLIFF file does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.`));
+ reject(new Error(`XLF parsing error: XLIFF file ${originalFilePath} does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.`));
}
});
files.push({ messages: messages, originalFilePath: originalFilePath, language: language.toLowerCase() });
@@ -483,7 +495,11 @@ function processCoreBundleFormat(fileHeader: string, languages: Language[], json
});
});
- let languageDirectory = path.join(__dirname, '..', '..', 'i18n');
+ let languageDirectory = path.join(__dirname, '..', '..', '..', 'vscode-loc', 'i18n');
+ if (!fs.existsSync(languageDirectory)) {
+ log(`No VS Code localization repository found. Looking at ${languageDirectory}`);
+ log(`To bundle translations please check out the vscode-loc repository as a sibling of the vscode repository.`);
+ }
let sortedLanguages = sortLanguages(languages);
sortedLanguages.forEach((language) => {
if (process.env['VSCODE_BUILD_VERBOSE']) {
@@ -492,21 +508,25 @@ function processCoreBundleFormat(fileHeader: string, languages: Language[], json
statistics[language.id] = 0;
let localizedModules: Map = Object.create(null);
- let languageFolderName = language.folderName || language.id;
- let cwd = path.join(languageDirectory, languageFolderName, 'src');
+ let languageFolderName = language.translationId || language.id;
+ let i18nFile = path.join(languageDirectory, `vscode-language-pack-${languageFolderName}`, 'translations', 'main.i18n.json');
+ let allMessages: I18nFormat | undefined;
+ if (fs.existsSync(i18nFile)) {
+ let content = stripComments(fs.readFileSync(i18nFile, 'utf8'));
+ allMessages = JSON.parse(content);
+ }
modules.forEach((module) => {
let order = keysSection[module];
- let i18nFile = path.join(cwd, module) + '.i18n.json';
- let messages: Map | null = null;
- if (fs.existsSync(i18nFile)) {
- let content = stripComments(fs.readFileSync(i18nFile, 'utf8'));
- messages = JSON.parse(content);
- } else {
+ let moduleMessage: { [messageKey: string]: string } | undefined;
+ if (allMessages) {
+ moduleMessage = allMessages.contents[module];
+ }
+ if (!moduleMessage) {
if (process.env['VSCODE_BUILD_VERBOSE']) {
log(`No localized messages found for module ${module}. Using default messages.`);
}
- messages = defaultMessages[module];
- statistics[language.id] = statistics[language.id] + Object.keys(messages).length;
+ moduleMessage = defaultMessages[module];
+ statistics[language.id] = statistics[language.id] + Object.keys(moduleMessage).length;
}
let localizedMessages: string[] = [];
order.forEach((keyInfo) => {
@@ -516,7 +536,7 @@ function processCoreBundleFormat(fileHeader: string, languages: Language[], json
} else {
key = keyInfo.key;
}
- let message: string = messages![key];
+ let message: string = moduleMessage![key];
if (!message) {
if (process.env['VSCODE_BUILD_VERBOSE']) {
log(`No localized message found for key ${key} in module ${module}. Using default message.`);
@@ -599,7 +619,7 @@ export function getResource(sourceFile: string): Resource {
return { name: 'vs/base', project: editorProject };
} else if (/^vs\/code/.test(sourceFile)) {
return { name: 'vs/code', project: workbenchProject };
- } else if (/^vs\/workbench\/parts/.test(sourceFile)) {
+ } else if (/^vs\/workbench\/contrib/.test(sourceFile)) {
resource = sourceFile.split('/', 4).join('/');
return { name: resource, project: workbenchProject };
} else if (/^vs\/workbench\/services/.test(sourceFile)) {
@@ -681,7 +701,7 @@ export function createXlfFilesForExtensions(): ThroughStream {
}
return _xlf;
}
- gulp.src([`./extensions/${extensionName}/package.nls.json`, `./extensions/${extensionName}/**/nls.metadata.json`]).pipe(through(function (file: File) {
+ gulp.src([`./extensions/${extensionName}/package.nls.json`, `./extensions/${extensionName}/**/nls.metadata.json`], { allowEmpty: true }).pipe(through(function (file: File) {
if (file.isBuffer()) {
const buffer: Buffer = file.contents as Buffer;
const basename = path.basename(file.path);
@@ -1082,7 +1102,7 @@ function retrieveResource(language: Language, resource: Resource, apiHostname: s
return limiter.queue(() => new Promise((resolve, reject) => {
const slug = resource.name.replace(/\//g, '_');
const project = resource.project;
- let transifexLanguageId = language.id === 'ps' ? 'en' : language.transifexId || language.id;
+ let transifexLanguageId = language.id === 'ps' ? 'en' : language.translationId || language.id;
const options = {
hostname: apiHostname,
path: `/api/2/project/${project}/resource/${slug}/translation/${transifexLanguageId}?file&mode=onlyreviewed`,
@@ -1181,9 +1201,10 @@ export function prepareI18nPackFiles(externalExtensions: Map, resultingT
let parsePromises: Promise[] = [];
let mainPack: I18nPack = { version: i18nPackVersion, contents: {} };
let extensionsPacks: Map = {};
+ let errors: any[] = [];
return through(function (this: ThroughStream, xlf: File) {
- let project = path.dirname(xlf.path);
- let resource = path.basename(xlf.path, '.xlf');
+ let project = path.basename(path.dirname(xlf.relative));
+ let resource = path.basename(xlf.relative, '.xlf');
let contents = xlf.contents.toString();
let parsePromise = pseudo ? XLF.parsePseudo(contents) : XLF.parse(contents);
parsePromises.push(parsePromise);
@@ -1210,10 +1231,15 @@ export function prepareI18nPackFiles(externalExtensions: Map, resultingT
}
});
}
- );
+ ).catch(reason => {
+ errors.push(reason);
+ });
}, function () {
Promise.all(parsePromises)
.then(() => {
+ if (errors.length > 0) {
+ throw errors;
+ }
const translatedMainFile = createI18nFile('./main', mainPack);
resultingTranslationPaths.push({ id: 'vscode', resourceName: 'main.i18n.json' });
@@ -1232,7 +1258,9 @@ export function prepareI18nPackFiles(externalExtensions: Map, resultingT
}
this.queue(null);
})
- .catch(reason => { throw new Error(reason); });
+ .catch((reason) => {
+ this.emit('error', reason);
+ });
});
}
@@ -1253,11 +1281,15 @@ export function prepareIslFiles(language: Language, innoSetupConfig: InnoSetup):
stream.queue(translatedFile);
});
}
- );
+ ).catch(reason => {
+ this.emit('error', reason);
+ });
}, function () {
Promise.all(parsePromises)
.then(() => { this.queue(null); })
- .catch(reason => { throw new Error(reason); });
+ .catch(reason => {
+ this.emit('error', reason);
+ });
});
}
@@ -1338,4 +1370,4 @@ function decodeEntities(value: string): string {
function pseudify(message: string) {
return '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D';
-}
\ No newline at end of file
+}
diff --git a/build/lib/optimize.js b/build/lib/optimize.js
index 07cdebe30ee..e4783e18569 100644
--- a/build/lib/optimize.js
+++ b/build/lib/optimize.js
@@ -13,7 +13,8 @@ const flatmap = require("gulp-flatmap");
const sourcemaps = require("gulp-sourcemaps");
const uglify = require("gulp-uglify");
const composer = require("gulp-uglify/composer");
-const gulpUtil = require("gulp-util");
+const fancyLog = require("fancy-log");
+const ansiColors = require("ansi-colors");
const path = require("path");
const pump = require("pump");
const uglifyes = require("uglify-es");
@@ -24,7 +25,7 @@ const stats_1 = require("./stats");
const util = require("./util");
const REPO_ROOT_PATH = path.join(__dirname, '../..');
function log(prefix, message) {
- gulpUtil.log(gulpUtil.colors.cyan('[' + prefix + ']'), message);
+ fancyLog(ansiColors.cyan('[' + prefix + ']'), message);
}
function loaderConfig(emptyPaths) {
const result = {
@@ -113,7 +114,6 @@ function toBundleStream(src, bundledFileHeader, bundles) {
function optimizeTask(opts) {
const src = opts.src;
const entryPoints = opts.entryPoints;
- const otherSources = opts.otherSources;
const resources = opts.resources;
const loaderConfig = opts.loaderConfig;
const bundledFileHeader = opts.header;
@@ -136,7 +136,7 @@ function optimizeTask(opts) {
}
filteredResources.push('!' + resource);
});
- gulp.src(filteredResources, { base: `${src}` }).pipe(resourcesStream);
+ gulp.src(filteredResources, { base: `${src}`, allowEmpty: true }).pipe(resourcesStream);
const bundleInfoArray = [];
if (opts.bundleInfo) {
bundleInfoArray.push(new VinylFile({
@@ -147,20 +147,7 @@ function optimizeTask(opts) {
}
es.readArray(bundleInfoArray).pipe(bundleInfoStream);
});
- const otherSourcesStream = es.through();
- const otherSourcesStreamArr = [];
- gulp.src(otherSources, { base: `${src}` })
- .pipe(es.through(function (data) {
- otherSourcesStreamArr.push(toConcatStream(src, bundledFileHeader, [data], data.relative));
- }, function () {
- if (!otherSourcesStreamArr.length) {
- setTimeout(function () { otherSourcesStream.emit('end'); }, 0);
- }
- else {
- es.merge(otherSourcesStreamArr).pipe(otherSourcesStream);
- }
- }));
- const result = es.merge(loader(src, bundledFileHeader, bundleLoader), bundlesStream, otherSourcesStream, resourcesStream, bundleInfoStream);
+ const result = es.merge(loader(src, bundledFileHeader, bundleLoader), bundlesStream, resourcesStream, bundleInfoStream);
return result
.pipe(sourcemaps.write('./', {
sourceRoot: undefined,
@@ -223,7 +210,12 @@ function minifyTask(src, sourceMapBaseUrl) {
return cb => {
const jsFilter = filter('**/*.js', { restore: true });
const cssFilter = filter('**/*.css', { restore: true });
- pump(gulp.src([src + '/**', '!' + src + '/**/*.map']), jsFilter, sourcemaps.init({ loadMaps: true }), uglifyWithCopyrights(), jsFilter.restore, cssFilter, minifyCSS({ reduceIdents: false }), cssFilter.restore, sourcemaps.write('./', {
+ pump(gulp.src([src + '/**', '!' + src + '/**/*.map']), jsFilter, sourcemaps.init({ loadMaps: true }), uglifyWithCopyrights(), jsFilter.restore, cssFilter, minifyCSS({ reduceIdents: false }), cssFilter.restore, sourcemaps.mapSources((sourcePath) => {
+ if (sourcePath === 'bootstrap-fork.js') {
+ return 'bootstrap-fork.orig.js';
+ }
+ return sourcePath;
+ }), sourcemaps.write('./', {
sourceMappingURL,
sourceRoot: undefined,
includeContent: true,
diff --git a/build/lib/optimize.ts b/build/lib/optimize.ts
index 85d15b23543..d15659ca6ea 100644
--- a/build/lib/optimize.ts
+++ b/build/lib/optimize.ts
@@ -14,7 +14,8 @@ import * as flatmap from 'gulp-flatmap';
import * as sourcemaps from 'gulp-sourcemaps';
import * as uglify from 'gulp-uglify';
import * as composer from 'gulp-uglify/composer';
-import * as gulpUtil from 'gulp-util';
+import * as fancyLog from 'fancy-log';
+import * as ansiColors from 'ansi-colors';
import * as path from 'path';
import * as pump from 'pump';
import * as sm from 'source-map';
@@ -28,7 +29,7 @@ import * as util from './util';
const REPO_ROOT_PATH = path.join(__dirname, '../..');
function log(prefix: string, message: string): void {
- gulpUtil.log(gulpUtil.colors.cyan('[' + prefix + ']'), message);
+ fancyLog(ansiColors.cyan('[' + prefix + ']'), message);
}
export function loaderConfig(emptyPaths?: string[]) {
@@ -141,10 +142,6 @@ export interface IOptimizeTaskOpts {
* (for AMD files, will get bundled and get Copyright treatment)
*/
entryPoints: bundle.IEntryPoint[];
- /**
- * (for non-AMD files that should get Copyright treatment)
- */
- otherSources: string[];
/**
* (svg, etc.)
*/
@@ -175,7 +172,6 @@ export interface IOptimizeTaskOpts {
export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStream {
const src = opts.src;
const entryPoints = opts.entryPoints;
- const otherSources = opts.otherSources;
const resources = opts.resources;
const loaderConfig = opts.loaderConfig;
const bundledFileHeader = opts.header;
@@ -200,7 +196,7 @@ export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStr
}
filteredResources.push('!' + resource);
});
- gulp.src(filteredResources, { base: `${src}` }).pipe(resourcesStream);
+ gulp.src(filteredResources, { base: `${src}`, allowEmpty: true }).pipe(resourcesStream);
const bundleInfoArray: VinylFile[] = [];
if (opts.bundleInfo) {
@@ -213,24 +209,9 @@ export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStr
es.readArray(bundleInfoArray).pipe(bundleInfoStream);
});
- const otherSourcesStream = es.through();
- const otherSourcesStreamArr: NodeJS.ReadWriteStream[] = [];
-
- gulp.src(otherSources, { base: `${src}` })
- .pipe(es.through(function (data) {
- otherSourcesStreamArr.push(toConcatStream(src, bundledFileHeader, [data], data.relative));
- }, function () {
- if (!otherSourcesStreamArr.length) {
- setTimeout(function () { otherSourcesStream.emit('end'); }, 0);
- } else {
- es.merge(otherSourcesStreamArr).pipe(otherSourcesStream);
- }
- }));
-
const result = es.merge(
loader(src, bundledFileHeader, bundleLoader),
bundlesStream,
- otherSourcesStream,
resourcesStream,
bundleInfoStream
);
@@ -317,6 +298,13 @@ export function minifyTask(src: string, sourceMapBaseUrl?: string): (cb: any) =>
cssFilter,
minifyCSS({ reduceIdents: false }),
cssFilter.restore,
+ (sourcemaps).mapSources((sourcePath: string) => {
+ if (sourcePath === 'bootstrap-fork.js') {
+ return 'bootstrap-fork.orig.js';
+ }
+
+ return sourcePath;
+ }),
sourcemaps.write('./', {
sourceMappingURL,
sourceRoot: undefined,
diff --git a/build/lib/reporter.js b/build/lib/reporter.js
index 598aabec244..e0461dc6d9d 100644
--- a/build/lib/reporter.js
+++ b/build/lib/reporter.js
@@ -6,7 +6,8 @@
Object.defineProperty(exports, "__esModule", { value: true });
const es = require("event-stream");
const _ = require("underscore");
-const util = require("gulp-util");
+const fancyLog = require("fancy-log");
+const ansiColors = require("ansi-colors");
const fs = require("fs");
const path = require("path");
const allErrors = [];
@@ -17,7 +18,7 @@ function onStart() {
return;
}
startTime = new Date().getTime();
- util.log(`Starting ${util.colors.green('compilation')}...`);
+ fancyLog(`Starting ${ansiColors.green('compilation')}...`);
}
function onEnd() {
if (--count > 0) {
@@ -38,7 +39,7 @@ function log() {
errors.map(err => {
if (!seen.has(err)) {
seen.add(err);
- util.log(`${util.colors.red('Error')}: ${err}`);
+ fancyLog(`${ansiColors.red('Error')}: ${err}`);
}
});
const regex = /^([^(]+)\((\d+),(\d+)\): (.*)$/;
@@ -53,7 +54,7 @@ function log() {
catch (err) {
//noop
}
- util.log(`Finished ${util.colors.green('compilation')} with ${errors.length} errors after ${util.colors.magenta((new Date().getTime() - startTime) + ' ms')}`);
+ fancyLog(`Finished ${ansiColors.green('compilation')} with ${errors.length} errors after ${ansiColors.magenta((new Date().getTime() - startTime) + ' ms')}`);
}
function createReporter() {
const errors = [];
diff --git a/build/lib/reporter.ts b/build/lib/reporter.ts
index 68e037e9224..ec908817518 100644
--- a/build/lib/reporter.ts
+++ b/build/lib/reporter.ts
@@ -7,7 +7,8 @@
import * as es from 'event-stream';
import * as _ from 'underscore';
-import * as util from 'gulp-util';
+import * as fancyLog from 'fancy-log';
+import * as ansiColors from 'ansi-colors';
import * as fs from 'fs';
import * as path from 'path';
@@ -21,7 +22,7 @@ function onStart(): void {
}
startTime = new Date().getTime();
- util.log(`Starting ${util.colors.green('compilation')}...`);
+ fancyLog(`Starting ${ansiColors.green('compilation')}...`);
}
function onEnd(): void {
@@ -47,7 +48,7 @@ function log(): void {
errors.map(err => {
if (!seen.has(err)) {
seen.add(err);
- util.log(`${util.colors.red('Error')}: ${err}`);
+ fancyLog(`${ansiColors.red('Error')}: ${err}`);
}
});
@@ -65,7 +66,7 @@ function log(): void {
//noop
}
- util.log(`Finished ${util.colors.green('compilation')} with ${errors.length} errors after ${util.colors.magenta((new Date().getTime() - startTime!) + ' ms')}`);
+ fancyLog(`Finished ${ansiColors.green('compilation')} with ${errors.length} errors after ${ansiColors.magenta((new Date().getTime() - startTime!) + ' ms')}`);
}
export interface IReporter {
diff --git a/build/lib/standalone.js b/build/lib/standalone.js
index 121a5e19220..da5987963b6 100644
--- a/build/lib/standalone.js
+++ b/build/lib/standalone.js
@@ -27,7 +27,7 @@ function writeFile(filePath, contents) {
fs.writeFileSync(filePath, contents);
}
function extractEditor(options) {
- const tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.json')).toString());
+ const tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.monaco.json')).toString());
let compilerOptions;
if (tsConfig.extends) {
compilerOptions = Object.assign({}, require(path.join(options.sourcesRoot, tsConfig.extends)).compilerOptions, tsConfig.compilerOptions);
@@ -36,13 +36,12 @@ function extractEditor(options) {
compilerOptions = tsConfig.compilerOptions;
}
tsConfig.compilerOptions = compilerOptions;
+ compilerOptions.noEmit = false;
compilerOptions.noUnusedLocals = false;
compilerOptions.preserveConstEnums = false;
compilerOptions.declaration = false;
+ compilerOptions.noImplicitAny = false;
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
- delete compilerOptions.types;
- delete tsConfig.extends;
- tsConfig.exclude = [];
options.compilerOptions = compilerOptions;
let result = tss.shake(options);
for (let fileName in result) {
@@ -92,6 +91,8 @@ function extractEditor(options) {
}
delete tsConfig.compilerOptions.moduleResolution;
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
+ const tsConfigBase = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.base.json')).toString());
+ writeOutputFile('tsconfig.base.json', JSON.stringify(tsConfigBase, null, '\t'));
[
'vs/css.build.js',
'vs/css.d.ts',
@@ -119,8 +120,7 @@ function createESMSourcesAndResources2(options) {
return path.join(OUT_RESOURCES_FOLDER, dest);
};
const allFiles = walkDirRecursive(SRC_FOLDER);
- for (let i = 0; i < allFiles.length; i++) {
- const file = allFiles[i];
+ for (const file of allFiles) {
if (options.ignores.indexOf(file.replace(/\\/g, '/')) >= 0) {
continue;
}
diff --git a/build/lib/standalone.ts b/build/lib/standalone.ts
index 6ec0aa1c958..79cdeeb455c 100644
--- a/build/lib/standalone.ts
+++ b/build/lib/standalone.ts
@@ -31,7 +31,7 @@ function writeFile(filePath: string, contents: Buffer | string): void {
}
export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: string }): void {
- const tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.json')).toString());
+ const tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.monaco.json')).toString());
let compilerOptions: { [key: string]: any };
if (tsConfig.extends) {
compilerOptions = Object.assign({}, require(path.join(options.sourcesRoot, tsConfig.extends)).compilerOptions, tsConfig.compilerOptions);
@@ -40,14 +40,13 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
}
tsConfig.compilerOptions = compilerOptions;
+ compilerOptions.noEmit = false;
compilerOptions.noUnusedLocals = false;
compilerOptions.preserveConstEnums = false;
compilerOptions.declaration = false;
+ compilerOptions.noImplicitAny = false;
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
- delete compilerOptions.types;
- delete tsConfig.extends;
- tsConfig.exclude = [];
options.compilerOptions = compilerOptions;
@@ -101,6 +100,8 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
delete tsConfig.compilerOptions.moduleResolution;
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
+ const tsConfigBase = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.base.json')).toString());
+ writeOutputFile('tsconfig.base.json', JSON.stringify(tsConfigBase, null, '\t'));
[
'vs/css.build.js',
@@ -139,8 +140,7 @@ export function createESMSourcesAndResources2(options: IOptions2): void {
};
const allFiles = walkDirRecursive(SRC_FOLDER);
- for (let i = 0; i < allFiles.length; i++) {
- const file = allFiles[i];
+ for (const file of allFiles) {
if (options.ignores.indexOf(file.replace(/\\/g, '/')) >= 0) {
continue;
@@ -244,7 +244,6 @@ export function createESMSourcesAndResources2(options: IOptions2): void {
let mode = 0;
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
-
if (mode === 0) {
if (/\/\/ ESM-comment-begin/.test(line)) {
mode = 1;
diff --git a/build/lib/stats.js b/build/lib/stats.js
index c08cd57b3bc..99ad665f223 100644
--- a/build/lib/stats.js
+++ b/build/lib/stats.js
@@ -5,7 +5,8 @@
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const es = require("event-stream");
-const util = require("gulp-util");
+const fancyLog = require("fancy-log");
+const ansiColors = require("ansi-colors");
const appInsights = require("applicationinsights");
class Entry {
constructor(name, totalCount, totalSize) {
@@ -24,13 +25,13 @@ class Entry {
}
else {
if (this.totalCount === 1) {
- return `Stats for '${util.colors.grey(this.name)}': ${Math.round(this.totalSize / 1204)}KB`;
+ return `Stats for '${ansiColors.grey(this.name)}': ${Math.round(this.totalSize / 1204)}KB`;
}
else {
const count = this.totalCount < 100
- ? util.colors.green(this.totalCount.toString())
- : util.colors.red(this.totalCount.toString());
- return `Stats for '${util.colors.grey(this.name)}': ${count} files, ${Math.round(this.totalSize / 1204)}KB`;
+ ? ansiColors.green(this.totalCount.toString())
+ : ansiColors.red(this.totalCount.toString());
+ return `Stats for '${ansiColors.grey(this.name)}': ${count} files, ${Math.round(this.totalSize / 1204)}KB`;
}
}
}
@@ -57,13 +58,13 @@ function createStatsStream(group, log) {
}, function () {
if (log) {
if (entry.totalCount === 1) {
- util.log(`Stats for '${util.colors.grey(entry.name)}': ${Math.round(entry.totalSize / 1204)}KB`);
+ fancyLog(`Stats for '${ansiColors.grey(entry.name)}': ${Math.round(entry.totalSize / 1204)}KB`);
}
else {
const count = entry.totalCount < 100
- ? util.colors.green(entry.totalCount.toString())
- : util.colors.red(entry.totalCount.toString());
- util.log(`Stats for '${util.colors.grey(entry.name)}': ${count} files, ${Math.round(entry.totalSize / 1204)}KB`);
+ ? ansiColors.green(entry.totalCount.toString())
+ : ansiColors.red(entry.totalCount.toString());
+ fancyLog(`Stats for '${ansiColors.grey(entry.name)}': ${count} files, ${Math.round(entry.totalSize / 1204)}KB`);
}
}
this.emit('end');
diff --git a/build/lib/stats.ts b/build/lib/stats.ts
index 7f5548dc1c4..a94b1c9ae1a 100644
--- a/build/lib/stats.ts
+++ b/build/lib/stats.ts
@@ -6,7 +6,8 @@
'use strict';
import * as es from 'event-stream';
-import * as util from 'gulp-util';
+import * as fancyLog from 'fancy-log';
+import * as ansiColors from 'ansi-colors';
import * as File from 'vinyl';
import * as appInsights from 'applicationinsights';
@@ -22,14 +23,14 @@ class Entry {
}
} else {
if (this.totalCount === 1) {
- return `Stats for '${util.colors.grey(this.name)}': ${Math.round(this.totalSize / 1204)}KB`;
+ return `Stats for '${ansiColors.grey(this.name)}': ${Math.round(this.totalSize / 1204)}KB`;
} else {
const count = this.totalCount < 100
- ? util.colors.green(this.totalCount.toString())
- : util.colors.red(this.totalCount.toString());
+ ? ansiColors.green(this.totalCount.toString())
+ : ansiColors.red(this.totalCount.toString());
- return `Stats for '${util.colors.grey(this.name)}': ${count} files, ${Math.round(this.totalSize / 1204)}KB`;
+ return `Stats for '${ansiColors.grey(this.name)}': ${count} files, ${Math.round(this.totalSize / 1204)}KB`;
}
}
}
@@ -58,14 +59,14 @@ export function createStatsStream(group: string, log?: boolean): es.ThroughStrea
}, function () {
if (log) {
if (entry.totalCount === 1) {
- util.log(`Stats for '${util.colors.grey(entry.name)}': ${Math.round(entry.totalSize / 1204)}KB`);
+ fancyLog(`Stats for '${ansiColors.grey(entry.name)}': ${Math.round(entry.totalSize / 1204)}KB`);
} else {
const count = entry.totalCount < 100
- ? util.colors.green(entry.totalCount.toString())
- : util.colors.red(entry.totalCount.toString());
+ ? ansiColors.green(entry.totalCount.toString())
+ : ansiColors.red(entry.totalCount.toString());
- util.log(`Stats for '${util.colors.grey(entry.name)}': ${count} files, ${Math.round(entry.totalSize / 1204)}KB`);
+ fancyLog(`Stats for '${ansiColors.grey(entry.name)}': ${count} files, ${Math.round(entry.totalSize / 1204)}KB`);
}
}
diff --git a/build/lib/task.js b/build/lib/task.js
new file mode 100644
index 00000000000..f1e6e3f6245
--- /dev/null
+++ b/build/lib/task.js
@@ -0,0 +1,96 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+'use strict';
+Object.defineProperty(exports, "__esModule", { value: true });
+const fancyLog = require("fancy-log");
+const ansiColors = require("ansi-colors");
+function _isPromise(p) {
+ if (typeof p.then === 'function') {
+ return true;
+ }
+ return false;
+}
+function _renderTime(time) {
+ return `${Math.round(time)} ms`;
+}
+async function _execute(task) {
+ const name = task.taskName || task.displayName || ``;
+ if (!task._tasks) {
+ fancyLog('Starting', ansiColors.cyan(name), '...');
+ }
+ const startTime = process.hrtime();
+ await _doExecute(task);
+ const elapsedArr = process.hrtime(startTime);
+ const elapsedNanoseconds = (elapsedArr[0] * 1e9 + elapsedArr[1]);
+ if (!task._tasks) {
+ fancyLog(`Finished`, ansiColors.cyan(name), 'after', ansiColors.magenta(_renderTime(elapsedNanoseconds / 1e6)));
+ }
+}
+async function _doExecute(task) {
+ // Always invoke as if it were a callback task
+ return new Promise((resolve, reject) => {
+ if (task.length === 1) {
+ // this is a callback task
+ task((err) => {
+ if (err) {
+ return reject(err);
+ }
+ resolve();
+ });
+ return;
+ }
+ const taskResult = task();
+ if (typeof taskResult === 'undefined') {
+ // this is a sync task
+ resolve();
+ return;
+ }
+ if (_isPromise(taskResult)) {
+ // this is a promise returning task
+ taskResult.then(resolve, reject);
+ return;
+ }
+ // this is a stream returning task
+ taskResult.on('end', _ => resolve());
+ taskResult.on('error', err => reject(err));
+ });
+}
+function series(...tasks) {
+ const result = async () => {
+ for (let i = 0; i < tasks.length; i++) {
+ await _execute(tasks[i]);
+ }
+ };
+ result._tasks = tasks;
+ return result;
+}
+exports.series = series;
+function parallel(...tasks) {
+ const result = async () => {
+ await Promise.all(tasks.map(t => _execute(t)));
+ };
+ result._tasks = tasks;
+ return result;
+}
+exports.parallel = parallel;
+function define(name, task) {
+ if (task._tasks) {
+ // This is a composite task
+ const lastTask = task._tasks[task._tasks.length - 1];
+ if (lastTask._tasks || lastTask.taskName) {
+ // This is a composite task without a real task function
+ // => generate a fake task function
+ return define(name, series(task, () => Promise.resolve()));
+ }
+ lastTask.taskName = name;
+ task.displayName = name;
+ return task;
+ }
+ // This is a simple task
+ task.taskName = name;
+ task.displayName = name;
+ return task;
+}
+exports.define = define;
diff --git a/build/lib/task.ts b/build/lib/task.ts
new file mode 100644
index 00000000000..4e571ec9294
--- /dev/null
+++ b/build/lib/task.ts
@@ -0,0 +1,125 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+'use strict';
+
+import * as fancyLog from 'fancy-log';
+import * as ansiColors from 'ansi-colors';
+
+export interface BaseTask {
+ displayName?: string;
+ taskName?: string;
+ _tasks?: Task[];
+}
+export interface PromiseTask extends BaseTask {
+ (): Promise;
+}
+export interface StreamTask extends BaseTask {
+ (): NodeJS.ReadWriteStream;
+}
+export interface CallbackTask extends BaseTask {
+ (cb?: (err?: any) => void): void;
+}
+
+export type Task = PromiseTask | StreamTask | CallbackTask;
+
+function _isPromise(p: Promise | NodeJS.ReadWriteStream): p is Promise {
+ if (typeof (p).then === 'function') {
+ return true;
+ }
+ return false;
+}
+
+function _renderTime(time: number): string {
+ return `${Math.round(time)} ms`;
+}
+
+async function _execute(task: Task): Promise {
+ const name = task.taskName || task.displayName || ``;
+ if (!task._tasks) {
+ fancyLog('Starting', ansiColors.cyan(name), '...');
+ }
+ const startTime = process.hrtime();
+ await _doExecute(task);
+ const elapsedArr = process.hrtime(startTime);
+ const elapsedNanoseconds = (elapsedArr[0] * 1e9 + elapsedArr[1]);
+ if (!task._tasks) {
+ fancyLog(`Finished`, ansiColors.cyan(name), 'after', ansiColors.magenta(_renderTime(elapsedNanoseconds / 1e6)));
+ }
+}
+
+async function _doExecute(task: Task): Promise {
+ // Always invoke as if it were a callback task
+ return new Promise((resolve, reject) => {
+ if (task.length === 1) {
+ // this is a callback task
+ task((err) => {
+ if (err) {
+ return reject(err);
+ }
+ resolve();
+ });
+ return;
+ }
+
+ const taskResult = task();
+
+ if (typeof taskResult === 'undefined') {
+ // this is a sync task
+ resolve();
+ return;
+ }
+
+ if (_isPromise(taskResult)) {
+ // this is a promise returning task
+ taskResult.then(resolve, reject);
+ return;
+ }
+
+ // this is a stream returning task
+ taskResult.on('end', _ => resolve());
+ taskResult.on('error', err => reject(err));
+ });
+}
+
+export function series(...tasks: Task[]): PromiseTask {
+ const result = async () => {
+ for (let i = 0; i < tasks.length; i++) {
+ await _execute(tasks[i]);
+ }
+ };
+ result._tasks = tasks;
+ return result;
+}
+
+export function parallel(...tasks: Task[]): PromiseTask {
+ const result = async () => {
+ await Promise.all(tasks.map(t => _execute(t)));
+ };
+ result._tasks = tasks;
+ return result;
+}
+
+export function define(name: string, task: Task): Task {
+ if (task._tasks) {
+ // This is a composite task
+ const lastTask = task._tasks[task._tasks.length - 1];
+
+ if (lastTask._tasks || lastTask.taskName) {
+ // This is a composite task without a real task function
+ // => generate a fake task function
+ return define(name, series(task, () => Promise.resolve()));
+ }
+
+ lastTask.taskName = name;
+ task.displayName = name;
+ return task;
+ }
+
+ // This is a simple task
+ task.taskName = name;
+ task.displayName = name;
+ return task;
+}
diff --git a/build/lib/test/i18n.test.js b/build/lib/test/i18n.test.js
index 8044a5eb711..298104865ab 100644
--- a/build/lib/test/i18n.test.js
+++ b/build/lib/test/i18n.test.js
@@ -27,13 +27,13 @@ suite('XLF Parser Tests', () => {
});
test('JSON file source path to Transifex resource match', () => {
const editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench';
- const platform = { name: 'vs/platform', project: editorProject }, editorContrib = { name: 'vs/editor/contrib', project: editorProject }, editor = { name: 'vs/editor', project: editorProject }, base = { name: 'vs/base', project: editorProject }, code = { name: 'vs/code', project: workbenchProject }, workbenchParts = { name: 'vs/workbench/parts/html', project: workbenchProject }, workbenchServices = { name: 'vs/workbench/services/files', project: workbenchProject }, workbench = { name: 'vs/workbench', project: workbenchProject };
+ const platform = { name: 'vs/platform', project: editorProject }, editorContrib = { name: 'vs/editor/contrib', project: editorProject }, editor = { name: 'vs/editor', project: editorProject }, base = { name: 'vs/base', project: editorProject }, code = { name: 'vs/code', project: workbenchProject }, workbenchParts = { name: 'vs/workbench/contrib/html', project: workbenchProject }, workbenchServices = { name: 'vs/workbench/services/files', project: workbenchProject }, workbench = { name: 'vs/workbench', project: workbenchProject };
assert.deepEqual(i18n.getResource('vs/platform/actions/browser/menusExtensionPoint'), platform);
assert.deepEqual(i18n.getResource('vs/editor/contrib/clipboard/browser/clipboard'), editorContrib);
assert.deepEqual(i18n.getResource('vs/editor/common/modes/modesRegistry'), editor);
assert.deepEqual(i18n.getResource('vs/base/common/errorMessage'), base);
assert.deepEqual(i18n.getResource('vs/code/electron-main/window'), code);
- assert.deepEqual(i18n.getResource('vs/workbench/parts/html/browser/webview'), workbenchParts);
+ assert.deepEqual(i18n.getResource('vs/workbench/contrib/html/browser/webview'), workbenchParts);
assert.deepEqual(i18n.getResource('vs/workbench/services/files/node/fileService'), workbenchServices);
assert.deepEqual(i18n.getResource('vs/workbench/browser/parts/panel/panelActions'), workbench);
});
diff --git a/build/lib/test/i18n.test.ts b/build/lib/test/i18n.test.ts
index cfc1041974b..eebc7742457 100644
--- a/build/lib/test/i18n.test.ts
+++ b/build/lib/test/i18n.test.ts
@@ -38,7 +38,7 @@ suite('XLF Parser Tests', () => {
editor = { name: 'vs/editor', project: editorProject },
base = { name: 'vs/base', project: editorProject },
code = { name: 'vs/code', project: workbenchProject },
- workbenchParts = { name: 'vs/workbench/parts/html', project: workbenchProject },
+ workbenchParts = { name: 'vs/workbench/contrib/html', project: workbenchProject },
workbenchServices = { name: 'vs/workbench/services/files', project: workbenchProject },
workbench = { name: 'vs/workbench', project: workbenchProject};
@@ -47,7 +47,7 @@ suite('XLF Parser Tests', () => {
assert.deepEqual(i18n.getResource('vs/editor/common/modes/modesRegistry'), editor);
assert.deepEqual(i18n.getResource('vs/base/common/errorMessage'), base);
assert.deepEqual(i18n.getResource('vs/code/electron-main/window'), code);
- assert.deepEqual(i18n.getResource('vs/workbench/parts/html/browser/webview'), workbenchParts);
+ assert.deepEqual(i18n.getResource('vs/workbench/contrib/html/browser/webview'), workbenchParts);
assert.deepEqual(i18n.getResource('vs/workbench/services/files/node/fileService'), workbenchServices);
assert.deepEqual(i18n.getResource('vs/workbench/browser/parts/panel/panelActions'), workbench);
});
diff --git a/build/lib/treeshaking.js b/build/lib/treeshaking.js
index 884d28279d8..da51ac19104 100644
--- a/build/lib/treeshaking.js
+++ b/build/lib/treeshaking.js
@@ -15,8 +15,7 @@ var ShakeLevel;
ShakeLevel[ShakeLevel["ClassMembers"] = 2] = "ClassMembers";
})(ShakeLevel = exports.ShakeLevel || (exports.ShakeLevel = {}));
function printDiagnostics(diagnostics) {
- for (let i = 0; i < diagnostics.length; i++) {
- const diag = diagnostics[i];
+ for (const diag of diagnostics) {
let result = '';
if (diag.file) {
result += `${diag.file.fileName}: `;
@@ -97,6 +96,11 @@ function discoverAndReadFiles(options) {
FILES[`${moduleId}.d.ts`] = dts_filecontents;
continue;
}
+ const js_filename = path.join(options.sourcesRoot, moduleId + '.js');
+ if (fs.existsSync(js_filename)) {
+ // This is an import for a .js file, so ignore it...
+ continue;
+ }
let ts_filename;
if (options.redirects[moduleId]) {
ts_filename = path.join(options.sourcesRoot, options.redirects[moduleId] + '.ts');
@@ -475,8 +479,7 @@ function generateResult(languageService, shakeLevel) {
}
else {
let survivingImports = [];
- for (let i = 0; i < node.importClause.namedBindings.elements.length; i++) {
- const importNode = node.importClause.namedBindings.elements[i];
+ for (const importNode of node.importClause.namedBindings.elements) {
if (getColor(importNode) === 2 /* Black */) {
survivingImports.push(importNode.getFullText(sourceFile));
}
diff --git a/build/lib/treeshaking.ts b/build/lib/treeshaking.ts
index 9c142793ade..060808312e6 100644
--- a/build/lib/treeshaking.ts
+++ b/build/lib/treeshaking.ts
@@ -61,15 +61,14 @@ export interface ITreeShakingResult {
}
function printDiagnostics(diagnostics: ReadonlyArray): void {
- for (let i = 0; i < diagnostics.length; i++) {
- const diag = diagnostics[i];
+ for (const diag of diagnostics) {
let result = '';
if (diag.file) {
result += `${diag.file.fileName}: `;
}
if (diag.file && diag.start) {
let location = diag.file.getLineAndCharacterOfPosition(diag.start);
- result += `- ${location.line + 1},${location.character} - `
+ result += `- ${location.line + 1},${location.character} - `;
}
result += JSON.stringify(diag.messageText);
console.log(result);
@@ -160,6 +159,12 @@ function discoverAndReadFiles(options: ITreeShakingOptions): IFileMap {
continue;
}
+ const js_filename = path.join(options.sourcesRoot, moduleId + '.js');
+ if (fs.existsSync(js_filename)) {
+ // This is an import for a .js file, so ignore it...
+ continue;
+ }
+
let ts_filename: string;
if (options.redirects[moduleId]) {
ts_filename = path.join(options.sourcesRoot, options.redirects[moduleId] + '.ts');
@@ -459,7 +464,7 @@ function markNodes(languageService: ts.LanguageService, options: ITreeShakingOpt
}
if (black_queue.length === 0) {
- for (let i = 0; i < gray_queue.length; i++) {
+ for (let i = 0; i< gray_queue.length; i++) {
const node = gray_queue[i];
const nodeParent = node.parent;
if ((ts.isClassDeclaration(nodeParent) || ts.isInterfaceDeclaration(nodeParent)) && nodeOrChildIsBlack(nodeParent)) {
@@ -604,8 +609,7 @@ function generateResult(languageService: ts.LanguageService, shakeLevel: ShakeLe
}
} else {
let survivingImports: string[] = [];
- for (let i = 0; i < node.importClause.namedBindings.elements.length; i++) {
- const importNode = node.importClause.namedBindings.elements[i];
+ for (const importNode of node.importClause.namedBindings.elements) {
if (getColor(importNode) === NodeColor.Black) {
survivingImports.push(importNode.getFullText(sourceFile));
}
diff --git a/build/lib/tslint/noNlsInStandaloneEditorRule.js b/build/lib/tslint/noNlsInStandaloneEditorRule.js
new file mode 100644
index 00000000000..affd4cc8370
--- /dev/null
+++ b/build/lib/tslint/noNlsInStandaloneEditorRule.js
@@ -0,0 +1,54 @@
+"use strict";
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", { value: true });
+const ts = require("typescript");
+const Lint = require("tslint");
+const path_1 = require("path");
+class Rule extends Lint.Rules.AbstractRule {
+ apply(sourceFile) {
+ if (/vs(\/|\\)editor(\/|\\)standalone(\/|\\)/.test(sourceFile.fileName)
+ || /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone(\/|\\)/.test(sourceFile.fileName)
+ || /vs(\/|\\)editor(\/|\\)editor.api/.test(sourceFile.fileName)
+ || /vs(\/|\\)editor(\/|\\)editor.main/.test(sourceFile.fileName)
+ || /vs(\/|\\)editor(\/|\\)editor.worker/.test(sourceFile.fileName)) {
+ return this.applyWithWalker(new NoNlsInStandaloneEditorRuleWalker(sourceFile, this.getOptions()));
+ }
+ return [];
+ }
+}
+exports.Rule = Rule;
+class NoNlsInStandaloneEditorRuleWalker extends Lint.RuleWalker {
+ constructor(file, opts) {
+ super(file, opts);
+ }
+ visitImportEqualsDeclaration(node) {
+ if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) {
+ this._validateImport(node.moduleReference.expression.getText(), node);
+ }
+ }
+ visitImportDeclaration(node) {
+ this._validateImport(node.moduleSpecifier.getText(), node);
+ }
+ visitCallExpression(node) {
+ super.visitCallExpression(node);
+ // import('foo') statements inside the code
+ if (node.expression.kind === ts.SyntaxKind.ImportKeyword) {
+ const [path] = node.arguments;
+ this._validateImport(path.getText(), node);
+ }
+ }
+ _validateImport(path, node) {
+ // remove quotes
+ path = path.slice(1, -1);
+ // resolve relative paths
+ if (path[0] === '.') {
+ path = path_1.join(this.getSourceFile().fileName, path);
+ }
+ if (/vs(\/|\\)nls/.test(path)) {
+ this.addFailure(this.createFailure(node.getStart(), node.getWidth(), `Not allowed to import vs/nls in standalone editor modules. Use standaloneStrings.ts`));
+ }
+ }
+}
diff --git a/build/lib/tslint/noNlsInStandaloneEditorRule.ts b/build/lib/tslint/noNlsInStandaloneEditorRule.ts
new file mode 100644
index 00000000000..ae23d74d784
--- /dev/null
+++ b/build/lib/tslint/noNlsInStandaloneEditorRule.ts
@@ -0,0 +1,67 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import * as ts from 'typescript';
+import * as Lint from 'tslint';
+import { join } from 'path';
+
+export class Rule extends Lint.Rules.AbstractRule {
+ public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
+ if (
+ /vs(\/|\\)editor(\/|\\)standalone(\/|\\)/.test(sourceFile.fileName)
+ || /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone(\/|\\)/.test(sourceFile.fileName)
+ || /vs(\/|\\)editor(\/|\\)editor.api/.test(sourceFile.fileName)
+ || /vs(\/|\\)editor(\/|\\)editor.main/.test(sourceFile.fileName)
+ || /vs(\/|\\)editor(\/|\\)editor.worker/.test(sourceFile.fileName)
+ ) {
+ return this.applyWithWalker(new NoNlsInStandaloneEditorRuleWalker(sourceFile, this.getOptions()));
+ }
+
+ return [];
+ }
+}
+
+class NoNlsInStandaloneEditorRuleWalker extends Lint.RuleWalker {
+
+ constructor(file: ts.SourceFile, opts: Lint.IOptions) {
+ super(file, opts);
+ }
+
+ protected visitImportEqualsDeclaration(node: ts.ImportEqualsDeclaration): void {
+ if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) {
+ this._validateImport(node.moduleReference.expression.getText(), node);
+ }
+ }
+
+ protected visitImportDeclaration(node: ts.ImportDeclaration): void {
+ this._validateImport(node.moduleSpecifier.getText(), node);
+ }
+
+ protected visitCallExpression(node: ts.CallExpression): void {
+ super.visitCallExpression(node);
+
+ // import('foo') statements inside the code
+ if (node.expression.kind === ts.SyntaxKind.ImportKeyword) {
+ const [path] = node.arguments;
+ this._validateImport(path.getText(), node);
+ }
+ }
+
+ private _validateImport(path: string, node: ts.Node): void {
+ // remove quotes
+ path = path.slice(1, -1);
+
+ // resolve relative paths
+ if (path[0] === '.') {
+ path = join(this.getSourceFile().fileName, path);
+ }
+
+ if (
+ /vs(\/|\\)nls/.test(path)
+ ) {
+ this.addFailure(this.createFailure(node.getStart(), node.getWidth(), `Not allowed to import vs/nls in standalone editor modules. Use standaloneStrings.ts`));
+ }
+ }
+}
diff --git a/build/lib/tslint/noStandaloneEditorRule.js b/build/lib/tslint/noStandaloneEditorRule.js
index 37bcf40e673..44b70a6a8d7 100644
--- a/build/lib/tslint/noStandaloneEditorRule.js
+++ b/build/lib/tslint/noStandaloneEditorRule.js
@@ -44,8 +44,8 @@ class NoStandaloneEditorRuleWalker extends Lint.RuleWalker {
if (path[0] === '.') {
path = path_1.join(this.getSourceFile().fileName, path);
}
- if (/vs(\/|\\)editor(\/|\\)standalone/.test(path)
- || /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone/.test(path)
+ if (/vs(\/|\\)editor(\/|\\)standalone(\/|\\)/.test(path)
+ || /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone(\/|\\)/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.api/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.main/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.worker/.test(path)) {
diff --git a/build/lib/tslint/noStandaloneEditorRule.ts b/build/lib/tslint/noStandaloneEditorRule.ts
index b85e2da037a..713b94097d4 100644
--- a/build/lib/tslint/noStandaloneEditorRule.ts
+++ b/build/lib/tslint/noStandaloneEditorRule.ts
@@ -53,8 +53,8 @@ class NoStandaloneEditorRuleWalker extends Lint.RuleWalker {
}
if (
- /vs(\/|\\)editor(\/|\\)standalone/.test(path)
- || /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone/.test(path)
+ /vs(\/|\\)editor(\/|\\)standalone(\/|\\)/.test(path)
+ || /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone(\/|\\)/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.api/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.main/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.worker/.test(path)
diff --git a/build/lib/tslint/noUnexternalizedStringsRule.js b/build/lib/tslint/noUnexternalizedStringsRule.js
index f79421effc1..18a90c0f9c1 100644
--- a/build/lib/tslint/noUnexternalizedStringsRule.js
+++ b/build/lib/tslint/noUnexternalizedStringsRule.js
@@ -109,8 +109,7 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker {
this.recordKey(keyArg, this.messageIndex && callInfo ? callInfo.callExpression.arguments[this.messageIndex] : undefined);
}
else if (isObjectLiteral(keyArg)) {
- for (let i = 0; i < keyArg.properties.length; i++) {
- const property = keyArg.properties[i];
+ for (const property of keyArg.properties) {
if (isPropertyAssignment(property)) {
const name = property.name.getText();
if (name === 'key') {
diff --git a/build/lib/tslint/noUnexternalizedStringsRule.ts b/build/lib/tslint/noUnexternalizedStringsRule.ts
index e8e8d001a00..e8c0e98ec15 100644
--- a/build/lib/tslint/noUnexternalizedStringsRule.ts
+++ b/build/lib/tslint/noUnexternalizedStringsRule.ts
@@ -148,8 +148,7 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker {
if (isStringLiteral(keyArg)) {
this.recordKey(keyArg, this.messageIndex && callInfo ? callInfo.callExpression.arguments[this.messageIndex] : undefined);
} else if (isObjectLiteral(keyArg)) {
- for (let i = 0; i < keyArg.properties.length; i++) {
- const property = keyArg.properties[i];
+ for (const property of keyArg.properties) {
if (isPropertyAssignment(property)) {
const name = property.name.getText();
if (name === 'key') {
diff --git a/build/lib/tslint/translationRemindRule.js b/build/lib/tslint/translationRemindRule.js
index 45bbd4688f6..2234094421b 100644
--- a/build/lib/tslint/translationRemindRule.js
+++ b/build/lib/tslint/translationRemindRule.js
@@ -33,7 +33,7 @@ class TranslationRemindRuleWalker extends Lint.RuleWalker {
visitImportLikeDeclaration(node) {
const currentFile = node.getSourceFile().fileName;
const matchService = currentFile.match(/vs\/workbench\/services\/\w+/);
- const matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/);
+ const matchPart = currentFile.match(/vs\/workbench\/contrib\/\w+/);
if (!matchService && !matchPart) {
return;
}
diff --git a/build/lib/tslint/translationRemindRule.ts b/build/lib/tslint/translationRemindRule.ts
index 559b782c6da..e2671599d3c 100644
--- a/build/lib/tslint/translationRemindRule.ts
+++ b/build/lib/tslint/translationRemindRule.ts
@@ -42,7 +42,7 @@ class TranslationRemindRuleWalker extends Lint.RuleWalker {
private visitImportLikeDeclaration(node: ts.ImportDeclaration | ts.ImportEqualsDeclaration) {
const currentFile = node.getSourceFile().fileName;
const matchService = currentFile.match(/vs\/workbench\/services\/\w+/);
- const matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/);
+ const matchPart = currentFile.match(/vs\/workbench\/contrib\/\w+/);
if (!matchService && !matchPart) {
return;
}
diff --git a/build/lib/util.js b/build/lib/util.js
index e6f041f3d60..6a210d3decc 100644
--- a/build/lib/util.js
+++ b/build/lib/util.js
@@ -8,12 +8,13 @@ const es = require("event-stream");
const debounce = require("debounce");
const _filter = require("gulp-filter");
const rename = require("gulp-rename");
-const _ = require("underscore");
const path = require("path");
const fs = require("fs");
const _rimraf = require("rimraf");
const git = require("./git");
const VinylFile = require("vinyl");
+const download_1 = require("../download/download");
+const REPO_ROOT = path.join(__dirname, '../../');
const NoCancellationToken = { isCancellationRequested: () => false };
function incremental(streamProvider, initial, supportsCancellation) {
const input = es.through();
@@ -98,22 +99,18 @@ function skipDirectories() {
});
}
exports.skipDirectories = skipDirectories;
-function cleanNodeModule(name, excludes, includes) {
- const toGlob = (path) => '**/node_modules/' + name + (path ? '/' + path : '');
- const negate = (str) => '!' + str;
- const allFilter = _filter(toGlob('**'), { restore: true });
- const globs = [toGlob('**')].concat(excludes.map(_.compose(negate, toGlob)));
+function cleanNodeModules(rulePath) {
+ const rules = fs.readFileSync(rulePath, 'utf8')
+ .split(/\r?\n/g)
+ .map(line => line.trim())
+ .filter(line => line && !/^#/.test(line));
+ const excludes = rules.filter(line => !/^!/.test(line)).map(line => `!**/node_modules/${line}`);
+ const includes = rules.filter(line => /^!/.test(line)).map(line => `**/node_modules/${line.substr(1)}`);
const input = es.through();
- const nodeModuleInput = input.pipe(allFilter);
- let output = nodeModuleInput.pipe(_filter(globs));
- if (includes) {
- const includeGlobs = includes.map(toGlob);
- output = es.merge(output, nodeModuleInput.pipe(_filter(includeGlobs)));
- }
- output = output.pipe(allFilter.restore);
+ const output = es.merge(input.pipe(_filter(['**', ...excludes])), input.pipe(_filter(includes)));
return es.duplex(input, output);
}
-exports.cleanNodeModule = cleanNodeModule;
+exports.cleanNodeModules = cleanNodeModules;
function loadSourcemaps() {
const input = es.through();
const output = input
@@ -180,7 +177,8 @@ function rimraf(dir) {
return cb(err);
});
};
- return cb => retry(cb);
+ retry.taskName = `clean-${path.basename(dir)}`;
+ return retry;
}
exports.rimraf = rimraf;
function getVersion(root) {
@@ -220,3 +218,38 @@ function versionStringToNumber(versionStr) {
return parseInt(match[1], 10) * 1e4 + parseInt(match[2], 10) * 1e2 + parseInt(match[3], 10);
}
exports.versionStringToNumber = versionStringToNumber;
+function download(requestOptions) {
+ const result = es.through();
+ const filename = path.join(REPO_ROOT, `.build/tmp-${Date.now()}-${path.posix.basename(requestOptions.path)}`);
+ const opts = {
+ requestOptions: requestOptions,
+ destinationPath: filename
+ };
+ download_1.downloadInExternalProcess(opts).then(() => {
+ fs.stat(filename, (err, stat) => {
+ if (err) {
+ result.emit('error', err);
+ return;
+ }
+ fs.readFile(filename, (err, data) => {
+ if (err) {
+ result.emit('error', err);
+ return;
+ }
+ fs.unlink(filename, () => {
+ result.emit('data', new VinylFile({
+ path: path.normalize(requestOptions.path),
+ stat: stat,
+ base: path.normalize(requestOptions.path),
+ contents: data
+ }));
+ result.emit('end');
+ });
+ });
+ });
+ }, (err) => {
+ result.emit('error', err);
+ });
+ return result;
+}
+exports.download = download;
diff --git a/build/lib/util.ts b/build/lib/util.ts
index 4617cc83f2f..e87c0650ec3 100644
--- a/build/lib/util.ts
+++ b/build/lib/util.ts
@@ -17,6 +17,9 @@ import * as git from './git';
import * as VinylFile from 'vinyl';
import { ThroughStream } from 'through';
import * as sm from 'source-map';
+import { IDownloadOptions, downloadInExternalProcess, IDownloadRequestOptions } from '../download/download';
+
+const REPO_ROOT = path.join(__dirname, '../../');
export interface ICancellationToken {
isCancellationRequested(): boolean;
@@ -129,23 +132,21 @@ export function skipDirectories(): NodeJS.ReadWriteStream {
});
}
-export function cleanNodeModule(name: string, excludes: string[], includes?: string[]): NodeJS.ReadWriteStream {
- const toGlob = (path: string) => '**/node_modules/' + name + (path ? '/' + path : '');
- const negate = (str: string) => '!' + str;
+export function cleanNodeModules(rulePath: string): NodeJS.ReadWriteStream {
+ const rules = fs.readFileSync(rulePath, 'utf8')
+ .split(/\r?\n/g)
+ .map(line => line.trim())
+ .filter(line => line && !/^#/.test(line));
- const allFilter = _filter(toGlob('**'), { restore: true });
- const globs = [toGlob('**')].concat(excludes.map(_.compose(negate, toGlob) as (x: string) => string));
+ const excludes = rules.filter(line => !/^!/.test(line)).map(line => `!**/node_modules/${line}`);
+ const includes = rules.filter(line => /^!/.test(line)).map(line => `**/node_modules/${line.substr(1)}`);
const input = es.through();
- const nodeModuleInput = input.pipe(allFilter);
- let output: NodeJS.ReadWriteStream = nodeModuleInput.pipe(_filter(globs));
+ const output = es.merge(
+ input.pipe(_filter(['**', ...excludes])),
+ input.pipe(_filter(includes))
+ );
- if (includes) {
- const includeGlobs = includes.map(toGlob);
- output = es.merge(output, nodeModuleInput.pipe(_filter(includeGlobs)));
- }
-
- output = output.pipe(allFilter.restore);
return es.duplex(input, output);
}
@@ -233,8 +234,8 @@ export function rimraf(dir: string): (cb: any) => void {
return cb(err);
});
};
-
- return cb => retry(cb);
+ retry.taskName = `clean-${path.basename(dir)}`;
+ return retry;
}
export function getVersion(root: string): string | undefined {
@@ -280,3 +281,38 @@ export function versionStringToNumber(versionStr: string) {
return parseInt(match[1], 10) * 1e4 + parseInt(match[2], 10) * 1e2 + parseInt(match[3], 10);
}
+
+export function download(requestOptions: IDownloadRequestOptions): NodeJS.ReadWriteStream {
+ const result = es.through();
+ const filename = path.join(REPO_ROOT, `.build/tmp-${Date.now()}-${path.posix.basename(requestOptions.path)}`);
+ const opts: IDownloadOptions = {
+ requestOptions: requestOptions,
+ destinationPath: filename
+ };
+ downloadInExternalProcess(opts).then(() => {
+ fs.stat(filename, (err, stat) => {
+ if (err) {
+ result.emit('error', err);
+ return;
+ }
+ fs.readFile(filename, (err, data) => {
+ if (err) {
+ result.emit('error', err);
+ return;
+ }
+ fs.unlink(filename, () => {
+ result.emit('data', new VinylFile({
+ path: path.normalize(requestOptions.path),
+ stat: stat,
+ base: path.normalize(requestOptions.path),
+ contents: data
+ }));
+ result.emit('end');
+ });
+ });
+ });
+ }, (err) => {
+ result.emit('error', err);
+ });
+ return result;
+}
diff --git a/build/lib/watch/index.js b/build/lib/watch/index.js
index 94f73cdd4a0..0a4af2a798f 100644
--- a/build/lib/watch/index.js
+++ b/build/lib/watch/index.js
@@ -17,7 +17,7 @@ function handleDeletions() {
});
}
-let watch = void 0;
+let watch = undefined;
if (!watch) {
watch = process.platform === 'win32' ? require('./watch-win32') : require('gulp-watch');
diff --git a/build/monaco/ThirdPartyNotices.txt b/build/monaco/ThirdPartyNotices.txt
index 45eeffb9f32..1de70ddaab6 100644
--- a/build/monaco/ThirdPartyNotices.txt
+++ b/build/monaco/ThirdPartyNotices.txt
@@ -7,23 +7,54 @@ herein, whether by implication, estoppel or otherwise.
-
-%% winjs version 4.4.0 (https://github.com/winjs/winjs)
+%% nodejs path library (https://github.com/nodejs/node/tree/43dd49c9782848c25e5b03448c8a0f923f13c158)
=========================================
-WinJS
+Copyright Joyent, Inc. and other Node contributors.
-Copyright (c) Microsoft Corporation
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to permit
+persons to whom the Software is furnished to do so, subject to the
+following conditions:
-All rights reserved.
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
-MIT License
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+USE OR OTHER DEALINGS IN THE SOFTWARE.
+=========================================
+END OF nodejs path library NOTICES AND INFORMATION
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+%% promise-polyfill version 8.1.0 (https://github.com/taylorhakes/promise-polyfill)
+=========================================
+Copyright (c) 2014 Taylor Hakes
+Copyright (c) 2014 Forbes Lindesay
-THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
=========================================
END OF winjs NOTICES AND INFORMATION
diff --git a/build/monaco/api.js b/build/monaco/api.js
index 716d1f56655..297510d14c1 100644
--- a/build/monaco/api.js
+++ b/build/monaco/api.js
@@ -7,14 +7,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const ts = require("typescript");
const path = require("path");
-const util = require("gulp-util");
+const fancyLog = require("fancy-log");
+const ansiColors = require("ansi-colors");
const dtsv = '2';
const tsfmt = require('../../tsfmt.json');
const SRC = path.join(__dirname, '../../src');
exports.RECIPE_PATH = path.join(__dirname, './monaco.d.ts.recipe');
const DECLARATION_PATH = path.join(__dirname, '../../src/vs/monaco.d.ts');
function logErr(message, ...rest) {
- util.log(util.colors.yellow(`[monaco.d.ts]`), message, ...rest);
+ fancyLog(ansiColors.yellow(`[monaco.d.ts]`), message, ...rest);
}
function isDeclaration(a) {
return (a.kind === ts.SyntaxKind.InterfaceDeclaration
@@ -456,11 +457,20 @@ class FSProvider {
existsSync(filePath) {
return fs.existsSync(filePath);
}
+ statSync(filePath) {
+ return fs.statSync(filePath);
+ }
readFileSync(_moduleId, filePath) {
return fs.readFileSync(filePath);
}
}
exports.FSProvider = FSProvider;
+class CacheEntry {
+ constructor(sourceFile, mtime) {
+ this.sourceFile = sourceFile;
+ this.mtime = mtime;
+ }
+}
class DeclarationResolver {
constructor(_fsProvider) {
this._fsProvider = _fsProvider;
@@ -470,31 +480,43 @@ class DeclarationResolver {
this._sourceFileCache[moduleId] = null;
}
getDeclarationSourceFile(moduleId) {
+ if (this._sourceFileCache[moduleId]) {
+ // Since we cannot trust file watching to invalidate the cache, check also the mtime
+ const fileName = this._getFileName(moduleId);
+ const mtime = this._fsProvider.statSync(fileName).mtime.getTime();
+ if (this._sourceFileCache[moduleId].mtime !== mtime) {
+ this._sourceFileCache[moduleId] = null;
+ }
+ }
if (!this._sourceFileCache[moduleId]) {
this._sourceFileCache[moduleId] = this._getDeclarationSourceFile(moduleId);
}
- return this._sourceFileCache[moduleId];
+ return this._sourceFileCache[moduleId] ? this._sourceFileCache[moduleId].sourceFile : null;
+ }
+ _getFileName(moduleId) {
+ if (/\.d\.ts$/.test(moduleId)) {
+ return path.join(SRC, moduleId);
+ }
+ return path.join(SRC, `${moduleId}.ts`);
}
_getDeclarationSourceFile(moduleId) {
- if (/\.d\.ts$/.test(moduleId)) {
- const fileName = path.join(SRC, moduleId);
- if (!this._fsProvider.existsSync(fileName)) {
- return null;
- }
- const fileContents = this._fsProvider.readFileSync(moduleId, fileName).toString();
- return ts.createSourceFile(fileName, fileContents, ts.ScriptTarget.ES5);
- }
- const fileName = path.join(SRC, `${moduleId}.ts`);
+ const fileName = this._getFileName(moduleId);
if (!this._fsProvider.existsSync(fileName)) {
return null;
}
+ const mtime = this._fsProvider.statSync(fileName).mtime.getTime();
+ if (/\.d\.ts$/.test(moduleId)) {
+ // const mtime = this._fsProvider.statFileSync()
+ const fileContents = this._fsProvider.readFileSync(moduleId, fileName).toString();
+ return new CacheEntry(ts.createSourceFile(fileName, fileContents, ts.ScriptTarget.ES5), mtime);
+ }
const fileContents = this._fsProvider.readFileSync(moduleId, fileName).toString();
const fileMap = {
'file.ts': fileContents
};
const service = ts.createLanguageService(new TypeScriptLanguageServiceHost({}, fileMap, {}));
const text = service.getEmitOutput('file.ts', true).outputFiles[0].text;
- return ts.createSourceFile(fileName, text, ts.ScriptTarget.ES5);
+ return new CacheEntry(ts.createSourceFile(fileName, text, ts.ScriptTarget.ES5), mtime);
}
}
exports.DeclarationResolver = DeclarationResolver;
diff --git a/build/monaco/api.ts b/build/monaco/api.ts
index d12b77787a0..7672188160b 100644
--- a/build/monaco/api.ts
+++ b/build/monaco/api.ts
@@ -6,7 +6,8 @@
import * as fs from 'fs';
import * as ts from 'typescript';
import * as path from 'path';
-import * as util from 'gulp-util';
+import * as fancyLog from 'fancy-log';
+import * as ansiColors from 'ansi-colors';
const dtsv = '2';
@@ -17,7 +18,7 @@ export const RECIPE_PATH = path.join(__dirname, './monaco.d.ts.recipe');
const DECLARATION_PATH = path.join(__dirname, '../../src/vs/monaco.d.ts');
function logErr(message: any, ...rest: any[]): void {
- util.log(util.colors.yellow(`[monaco.d.ts]`), message, ...rest);
+ fancyLog(ansiColors.yellow(`[monaco.d.ts]`), message, ...rest);
}
type SourceFileGetter = (moduleId: string) => ts.SourceFile | null;
@@ -547,14 +548,24 @@ export class FSProvider {
public existsSync(filePath: string): boolean {
return fs.existsSync(filePath);
}
+ public statSync(filePath: string): fs.Stats {
+ return fs.statSync(filePath);
+ }
public readFileSync(_moduleId: string, filePath: string): Buffer {
return fs.readFileSync(filePath);
}
}
+class CacheEntry {
+ constructor(
+ public readonly sourceFile: ts.SourceFile,
+ public readonly mtime: number
+ ) {}
+}
+
export class DeclarationResolver {
- private _sourceFileCache: { [moduleId: string]: ts.SourceFile | null; };
+ private _sourceFileCache: { [moduleId: string]: CacheEntry | null; };
constructor(private readonly _fsProvider: FSProvider) {
this._sourceFileCache = Object.create(null);
@@ -565,32 +576,51 @@ export class DeclarationResolver {
}
public getDeclarationSourceFile(moduleId: string): ts.SourceFile | null {
+ if (this._sourceFileCache[moduleId]) {
+ // Since we cannot trust file watching to invalidate the cache, check also the mtime
+ const fileName = this._getFileName(moduleId);
+ const mtime = this._fsProvider.statSync(fileName).mtime.getTime();
+ if (this._sourceFileCache[moduleId]!.mtime !== mtime) {
+ this._sourceFileCache[moduleId] = null;
+ }
+ }
if (!this._sourceFileCache[moduleId]) {
this._sourceFileCache[moduleId] = this._getDeclarationSourceFile(moduleId);
}
- return this._sourceFileCache[moduleId];
+ return this._sourceFileCache[moduleId] ? this._sourceFileCache[moduleId]!.sourceFile : null;
}
- private _getDeclarationSourceFile(moduleId: string): ts.SourceFile | null {
+ private _getFileName(moduleId: string): string {
if (/\.d\.ts$/.test(moduleId)) {
- const fileName = path.join(SRC, moduleId);
- if (!this._fsProvider.existsSync(fileName)) {
- return null;
- }
- const fileContents = this._fsProvider.readFileSync(moduleId, fileName).toString();
- return ts.createSourceFile(fileName, fileContents, ts.ScriptTarget.ES5);
+ return path.join(SRC, moduleId);
}
- const fileName = path.join(SRC, `${moduleId}.ts`);
+ return path.join(SRC, `${moduleId}.ts`);
+ }
+
+ private _getDeclarationSourceFile(moduleId: string): CacheEntry | null {
+ const fileName = this._getFileName(moduleId);
if (!this._fsProvider.existsSync(fileName)) {
return null;
}
+ const mtime = this._fsProvider.statSync(fileName).mtime.getTime();
+ if (/\.d\.ts$/.test(moduleId)) {
+ // const mtime = this._fsProvider.statFileSync()
+ const fileContents = this._fsProvider.readFileSync(moduleId, fileName).toString();
+ return new CacheEntry(
+ ts.createSourceFile(fileName, fileContents, ts.ScriptTarget.ES5),
+ mtime
+ );
+ }
const fileContents = this._fsProvider.readFileSync(moduleId, fileName).toString();
const fileMap: IFileMap = {
'file.ts': fileContents
};
const service = ts.createLanguageService(new TypeScriptLanguageServiceHost({}, fileMap, {}));
const text = service.getEmitOutput('file.ts', true).outputFiles[0].text;
- return ts.createSourceFile(fileName, text, ts.ScriptTarget.ES5);
+ return new CacheEntry(
+ ts.createSourceFile(fileName, text, ts.ScriptTarget.ES5),
+ mtime
+ );
}
}
diff --git a/build/monaco/monaco.d.ts.recipe b/build/monaco/monaco.d.ts.recipe
index 356ef3ff046..ed3a8f5d260 100644
--- a/build/monaco/monaco.d.ts.recipe
+++ b/build/monaco/monaco.d.ts.recipe
@@ -21,12 +21,11 @@ declare namespace monaco {
export class Emitter {
constructor();
readonly event: Event;
- fire(event?: T): void;
+ fire(event: T): void;
dispose(): void;
}
#include(vs/platform/markers/common/markers): MarkerTag, MarkerSeverity
-#include(vs/base/common/winjs.base.d.ts): Promise
#include(vs/base/common/cancellation): CancellationTokenSource, CancellationToken
#include(vs/base/common/uri): URI, UriComponents
#include(vs/base/common/keyCodes): KeyCode
@@ -86,4 +85,4 @@ declare namespace monaco.worker {
}
-//dtsv=2
\ No newline at end of file
+//dtsv=2
diff --git a/build/monaco/monaco.usage.recipe b/build/monaco/monaco.usage.recipe
index 663f7b7cc26..13290a7abb5 100644
--- a/build/monaco/monaco.usage.recipe
+++ b/build/monaco/monaco.usage.recipe
@@ -10,9 +10,10 @@ import { CountBadge } from './vs/base/browser/ui/countBadge/countBadge';
import { SimpleWorkerClient, create as create1 } from './vs/base/common/worker/simpleWorker';
import { create as create2 } from './vs/editor/common/services/editorSimpleWorker';
import { QuickOpenWidget } from './vs/base/parts/quickopen/browser/quickOpenWidget';
+import { WorkbenchAsyncDataTree } from './vs/platform/list/browser/listService';
import { SyncDescriptor0, SyncDescriptor1, SyncDescriptor2, SyncDescriptor3, SyncDescriptor4, SyncDescriptor5, SyncDescriptor6, SyncDescriptor7, SyncDescriptor8 } from './vs/platform/instantiation/common/descriptors';
-import { PolyfillPromise } from './vs/base/common/winjs.polyfill.promise';
import { DiffNavigator } from './vs/editor/browser/widget/diffNavigator';
+import { DocumentRangeFormattingEditProvider } from './vs/editor/common/modes';
import * as editorAPI from './vs/editor/editor.api';
(function () {
@@ -23,6 +24,7 @@ import * as editorAPI from './vs/editor/editor.api';
a = (b).getWorkspace; // IWorkspaceFolderProvider
a = (b).style; // IThemable
a = (b).style; // IThemable
+ a = (>b).style; // IThemable
a = (b).userHome; // IUserHomeProvider
a = (b).previous; // IDiffNavigator
a = (>b).type;
@@ -31,14 +33,7 @@ import * as editorAPI from './vs/editor/editor.api';
a = (>b).getProxyObject; // IWorkerClient
a = create1;
a = create2;
-
- // promise polyfill
- a = PolyfillPromise.all;
- a = PolyfillPromise.race;
- a = PolyfillPromise.resolve;
- a = PolyfillPromise.reject;
- a = (b).then;
- a = (b).catch;
+ a = (b).extensionId;
// injection madness
a = (>b).ctor;
@@ -73,7 +68,6 @@ import * as editorAPI from './vs/editor/editor.api';
a = editorAPI.SelectionDirection;
a = editorAPI.MarkerSeverity;
a = editorAPI.MarkerTag;
- a = editorAPI.Promise;
a = editorAPI.Uri;
a = editorAPI.Token;
a = editorAPI.editor;
diff --git a/build/monaco/package.json b/build/monaco/package.json
index efd919085b2..1962694ce6d 100644
--- a/build/monaco/package.json
+++ b/build/monaco/package.json
@@ -1,7 +1,7 @@
{
"name": "monaco-editor-core",
"private": true,
- "version": "0.14.3",
+ "version": "0.16.0",
"description": "A browser based code editor",
"author": "Microsoft Corporation",
"license": "MIT",
diff --git a/build/monaco/version.txt b/build/monaco/version.txt
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js
index ea2d2d9a2dc..02755e171ec 100644
--- a/build/npm/postinstall.js
+++ b/build/npm/postinstall.js
@@ -17,7 +17,17 @@ function yarnInstall(location, opts) {
opts.cwd = location;
opts.stdio = 'inherit';
- const result = cp.spawnSync(yarn, ['install'], opts);
+ const raw = process.env['npm_config_argv'] || '{}';
+ const argv = JSON.parse(raw);
+ const original = argv.original || [];
+ const args = ['install'];
+
+ if (original.indexOf('--ignore-optional') > -1) {
+ args.push('--ignore-optional');
+ }
+
+ console.log('Installing dependencies in \'%s\'.', location);
+ const result = cp.spawnSync(yarn, args, opts);
if (result.error || result.status !== 0) {
process.exit(1);
diff --git a/build/npm/preinstall.js b/build/npm/preinstall.js
index a2029c364fa..3b0d7dc538f 100644
--- a/build/npm/preinstall.js
+++ b/build/npm/preinstall.js
@@ -7,8 +7,8 @@ let err = false;
const majorNodeVersion = parseInt(/^(\d+)\./.exec(process.versions.node)[1]);
-if (majorNodeVersion < 8 || majorNodeVersion >= 9) {
- console.error('\033[1;31m*** Please use node >=8 and <9.\033[0;0m');
+if (majorNodeVersion < 8 || majorNodeVersion >= 11) {
+ console.error('\033[1;31m*** Please use node >=8 and <11.\033[0;0m');
err = true;
}
diff --git a/build/npm/update-grammar.js b/build/npm/update-grammar.js
index c009e36285c..522b2941218 100644
--- a/build/npm/update-grammar.js
+++ b/build/npm/update-grammar.js
@@ -12,6 +12,8 @@ var cson = require('cson-parser');
var https = require('https');
var url = require('url');
+let commitDate = '0000-00-00';
+
/**
* @param {string} urlString
*/
@@ -120,8 +122,35 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar, version = 'mas
try {
fs.writeFileSync(dest, JSON.stringify(result, null, '\t').replace(/\n/g, '\r\n'));
+ let cgmanifestRead = JSON.parse(fs.readFileSync('./cgmanifest.json').toString());
+ let promises = new Array();
+ const currentCommitDate = info.commitDate.substr(0, 10);
+
+ // Add commit sha to cgmanifest.
+ if (currentCommitDate > commitDate) {
+ let packageJsonPath = 'https://raw.githubusercontent.com/' + repoId + `/${info.commitSha}/package.json`;
+ for (let i = 0; i < cgmanifestRead.registrations.length; i++) {
+ if (cgmanifestRead.registrations[i].component.git.repositoryUrl.substr(cgmanifestRead.registrations[i].component.git.repositoryUrl.length - repoId.length, repoId.length) === repoId) {
+ cgmanifestRead.registrations[i].component.git.commitHash = info.commitSha;
+ commitDate = currentCommitDate;
+ promises.push(download(packageJsonPath).then(function (packageJson) {
+ if (packageJson) {
+ try {
+ cgmanifestRead.registrations[i].version = JSON.parse(packageJson).version;
+ } catch (e) {
+ console.log('Cannot get version. File does not exist at ' + packageJsonPath);
+ }
+ }
+ }));
+ break;
+ }
+ }
+ }
+ Promise.all(promises).then(function (allResult) {
+ fs.writeFileSync('./cgmanifest.json', JSON.stringify(cgmanifestRead, null, '\t').replace(/\n/g, '\r\n'));
+ });
if (info) {
- console.log('Updated ' + path.basename(dest) + ' to ' + repoId + '@' + info.commitSha.substr(0, 7) + ' (' + info.commitDate.substr(0, 10) + ')');
+ console.log('Updated ' + path.basename(dest) + ' to ' + repoId + '@' + info.commitSha.substr(0, 7) + ' (' + currentCommitDate + ')');
} else {
console.log('Updated ' + path.basename(dest));
}
diff --git a/build/npm/update-localization-extension.js b/build/npm/update-localization-extension.js
index eebf63ed330..b1656dc88f4 100644
--- a/build/npm/update-localization-extension.js
+++ b/build/npm/update-localization-extension.js
@@ -9,16 +9,31 @@ let i18n = require("../lib/i18n");
let fs = require("fs");
let path = require("path");
+
+let gulp = require('gulp');
let vfs = require("vinyl-fs");
let rimraf = require('rimraf');
+let minimist = require('minimist');
-function update(idOrPath) {
+function update(options) {
+ let idOrPath = options._;
if (!idOrPath) {
throw new Error('Argument must be the location of the localization extension.');
}
+ let transifex = options.transifex;
+ let location = options.location;
+ if (transifex === true && location !== undefined) {
+ throw new Error('Either --transifex or --location can be specified, but not both.');
+ }
+ if (!transifex && !location) {
+ transifex = true;
+ }
+ if (location !== undefined && !fs.existsSync(location)) {
+ throw new Error(`${location} doesn't exist.`);
+ }
let locExtFolder = idOrPath;
if (/^\w{2}(-\w+)?$/.test(idOrPath)) {
- locExtFolder = '../vscode-language-pack-' + idOrPath;
+ locExtFolder = path.join('..', 'vscode-loc', 'i18n', `vscode-language-pack-${idOrPath}`);
}
let locExtStat = fs.statSync(locExtFolder);
if (!locExtStat || !locExtStat.isDirectory) {
@@ -54,21 +69,64 @@ function update(idOrPath) {
rimraf.sync(translationDataFolder);
}
- console.log('Downloading translations for \'' + languageId + '\' to \'' + translationDataFolder + '\'...');
- const translationPaths = [];
- i18n.pullI18nPackFiles(server, userName, apiToken, { id: languageId }, translationPaths)
- .pipe(vfs.dest(translationDataFolder)).on('end', function () {
- localization.translations = [];
- for (let tp of translationPaths) {
- localization.translations.push({ id: tp.id, path: `./translations/${tp.resourceName}`});
- }
- fs.writeFileSync(path.join(locExtFolder, 'package.json'), JSON.stringify(packageJSON, null, '\t'));
- });
-
+ if (transifex) {
+ console.log(`Downloading translations for ${languageId} to '${translationDataFolder}' ...`);
+ let translationPaths = [];
+ i18n.pullI18nPackFiles(server, userName, apiToken, { id: languageId }, translationPaths)
+ .on('error', (error) => {
+ console.log(`Error occurred while importing translations:`);
+ translationPaths = undefined;
+ if (Array.isArray(error)) {
+ error.forEach(console.log);
+ } else if (error) {
+ console.log(error);
+ } else {
+ console.log('Unknown error');
+ }
+ })
+ .pipe(vfs.dest(translationDataFolder))
+ .on('end', function () {
+ if (translationPaths !== undefined) {
+ localization.translations = [];
+ for (let tp of translationPaths) {
+ localization.translations.push({ id: tp.id, path: `./translations/${tp.resourceName}`});
+ }
+ fs.writeFileSync(path.join(locExtFolder, 'package.json'), JSON.stringify(packageJSON, null, '\t'));
+ }
+ });
+ } else {
+ console.log(`Importing translations for ${languageId} form '${location}' to '${translationDataFolder}' ...`);
+ let translationPaths = [];
+ gulp.src(path.join(location, languageId, '**', '*.xlf'))
+ .pipe(i18n.prepareI18nPackFiles(i18n.externalExtensionsWithTranslations, translationPaths, languageId === 'ps'))
+ .on('error', (error) => {
+ console.log(`Error occurred while importing translations:`);
+ translationPaths = undefined;
+ if (Array.isArray(error)) {
+ error.forEach(console.log);
+ } else if (error) {
+ console.log(error);
+ } else {
+ console.log('Unknown error');
+ }
+ })
+ .pipe(vfs.dest(translationDataFolder))
+ .on('end', function () {
+ if (translationPaths !== undefined) {
+ localization.translations = [];
+ for (let tp of translationPaths) {
+ localization.translations.push({ id: tp.id, path: `./translations/${tp.resourceName}`});
+ }
+ fs.writeFileSync(path.join(locExtFolder, 'package.json'), JSON.stringify(packageJSON, null, '\t'));
+ }
+ });
+ }
});
-
-
}
if (path.basename(process.argv[1]) === 'update-localization-extension.js') {
- update(process.argv[2]);
+ var options = minimist(process.argv.slice(2), {
+ boolean: 'transifex',
+ string: 'location'
+ });
+ update(options);
}
diff --git a/build/package.json b/build/package.json
index 7e096ee9bab..49495b1c1e5 100644
--- a/build/package.json
+++ b/build/package.json
@@ -2,9 +2,11 @@
"name": "code-oss-dev-build",
"version": "1.0.0",
"devDependencies": {
+ "@types/ansi-colors": "^3.2.0",
"@types/azure": "0.9.19",
"@types/debounce": "^1.0.0",
"@types/documentdb": "1.10.2",
+ "@types/fancy-log": "^1.3.0",
"@types/glob": "^7.1.1",
"@types/gulp": "^4.0.5",
"@types/gulp-concat": "^0.0.32",
@@ -13,7 +15,6 @@
"@types/gulp-rename": "^0.0.33",
"@types/gulp-sourcemaps": "^0.0.32",
"@types/gulp-uglify": "^3.0.5",
- "@types/gulp-util": "^3.0.34",
"@types/mime": "0.0.29",
"@types/minimatch": "^3.0.3",
"@types/minimist": "^1.2.0",
@@ -38,7 +39,7 @@
"minimist": "^1.2.0",
"request": "^2.85.0",
"tslint": "^5.9.1",
- "typescript": "3.1.4",
+ "typescript": "3.4.5",
"vsce": "1.48.0",
"xml2js": "^0.4.17"
},
@@ -48,4 +49,4 @@
"postinstall": "npm run compile",
"npmCheckJs": "tsc --noEmit"
}
-}
+}
\ No newline at end of file
diff --git a/build/tsconfig.json b/build/tsconfig.json
index 46ad745bc23..df15ccdd1be 100644
--- a/build/tsconfig.json
+++ b/build/tsconfig.json
@@ -8,7 +8,7 @@
"resolveJsonModule": true,
"experimentalDecorators": true,
// enable JavaScript type checking for the language service
- // use the tsconfig.build.json for compiling wich disable JavaScript
+ // use the tsconfig.build.json for compiling which disable JavaScript
// type checking so that JavaScript file are not transpiled
"allowJs": true,
"checkJs": true,
@@ -22,4 +22,4 @@
"exclude": [
"node_modules/**"
]
-}
\ No newline at end of file
+}
diff --git a/build/win32/code.iss b/build/win32/code.iss
index 43572199eb5..ea31a50c9bf 100644
--- a/build/win32/code.iss
+++ b/build/win32/code.iss
@@ -1,7 +1,7 @@
#define LocalizedLanguageFile(Language = "") \
DirExists(RepoDir + "\licenses") && Language != "" \
- ? ('; LicenseFile: "' + RepoDir + '\licenses\LICENSE-' + Language + '.txt"') \
- : '; LicenseFile: "' + RepoDir + '\LICENSE.txt"'
+ ? ('; LicenseFile: "' + RepoDir + '\licenses\LICENSE-' + Language + '.rtf"') \
+ : '; LicenseFile: "' + RepoDir + '\LICENSE.rtf"'
[Setup]
AppId={#AppId}
diff --git a/build/yarn.lock b/build/yarn.lock
index 45a09657223..3d6f612789b 100644
--- a/build/yarn.lock
+++ b/build/yarn.lock
@@ -10,6 +10,11 @@
normalize-path "^2.0.1"
through2 "^2.0.3"
+"@types/ansi-colors@^3.2.0":
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/@types/ansi-colors/-/ansi-colors-3.2.0.tgz#3e4fe85d9131ce1c6994f3040bd0b25306c16a6e"
+ integrity sha512-0caWAhXht9N2lOdMzJLXybsSkYCx1QOdxx6pae48tswI9QV3DFX26AoOpy0JxwhCb+zISTqmd6H8t9Zby9BoZg==
+
"@types/azure@0.9.19":
version "0.9.19"
resolved "https://registry.yarnpkg.com/@types/azure/-/azure-0.9.19.tgz#1a6a9bd856b437ddecf3f9fc8407a683c869ba02"
@@ -47,6 +52,11 @@
resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86"
integrity sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==
+"@types/fancy-log@^1.3.0":
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/@types/fancy-log/-/fancy-log-1.3.0.tgz#a61ab476e5e628cd07a846330df53b85e05c8ce0"
+ integrity sha512-mQjDxyOM1Cpocd+vm1kZBP7smwKZ4TNokFeds9LV7OZibmPJFEzY3+xZMrKfUdNT71lv8GoCPD6upKwHxubClw==
+
"@types/form-data@*":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.1.tgz#ee2b3b8eaa11c0938289953606b745b738c54b1e"
@@ -117,16 +127,6 @@
"@types/node" "*"
"@types/uglify-js" "^2"
-"@types/gulp-util@^3.0.34":
- version "3.0.34"
- resolved "https://registry.yarnpkg.com/@types/gulp-util/-/gulp-util-3.0.34.tgz#d1291ebf706d93f46eb8df11344bbfd96247697e"
- integrity sha512-E06WN1OfqL5UsMwJ1T7ClgnaXgaPipb7Ee8euMc3KRHLNqxdvWrDir9KA6uevgzBgT7XbjgmzZA2pkzDqBBX7A==
- dependencies:
- "@types/node" "*"
- "@types/through2" "*"
- "@types/vinyl" "*"
- chalk "^2.2.0"
-
"@types/gulp@^4.0.5":
version "4.0.5"
resolved "https://registry.yarnpkg.com/@types/gulp/-/gulp-4.0.5.tgz#f5f498d5bf9538364792de22490a12c0e6bc5eb4"
@@ -196,7 +196,7 @@
"@types/glob" "*"
"@types/node" "*"
-"@types/through2@*", "@types/through2@^2.0.34":
+"@types/through2@^2.0.34":
version "2.0.34"
resolved "https://registry.yarnpkg.com/@types/through2/-/through2-2.0.34.tgz#9c2a259a238dace2a05a2f8e94b786961bc27ac4"
integrity sha512-nhRG8+RuG/L+0fAZBQYaRflXKjTrHOKH8MFTChnf+dNVMxA3wHYYrfj0tztK0W51ABXjGfRCDc0vRkecCOrsow==
@@ -512,7 +512,7 @@ chalk@^1.0.0, chalk@^1.1.3:
strip-ansi "^3.0.0"
supports-color "^2.0.0"
-chalk@^2.2.0, chalk@^2.3.0:
+chalk@^2.3.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==
@@ -1894,10 +1894,10 @@ typed-rest-client@^0.9.0:
tunnel "0.0.4"
underscore "1.8.3"
-typescript@3.1.4:
- version "3.1.4"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.4.tgz#c74ef7b3c2da65beff548b903022cb8c3cd997ed"
- integrity sha512-JZHJtA6ZL15+Q3Dqkbh8iCUmvxD3iJ7ujXS+fVkKnwIVAdHc5BJTDNM0aTrnr2luKulFjU7W+SRhDZvi66Ru7Q==
+typescript@3.4.5:
+ version "3.4.5"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99"
+ integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==
uc.micro@^1.0.1, uc.micro@^1.0.5:
version "1.0.5"
diff --git a/cglicenses.json b/cglicenses.json
index 943a03cbf96..3d96813f3ef 100644
--- a/cglicenses.json
+++ b/cglicenses.json
@@ -620,25 +620,6 @@
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
]
},
-{
- // Waiting for https://github.com/ralphtheninja/expand-template/issues/10
- "name": "expand-template",
- "licenseDetail": [
- " DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE",
- " Version 2, December 2004",
- "",
- " Copyright (C) 2004 Sam Hocevar ",
- "",
- " Everyone is permitted to copy and distribute verbatim or modified",
- " copies of this license document, and changing it is allowed as long",
- " as the name is changed.",
- "",
- " DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE",
- " TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION",
- "",
- " 0. You just DO WHAT THE FUCK YOU WANT TO."
- ]
-},
{
"name": "tunnel-agent",
"licenseDetail": [
diff --git a/cgmanifest.json b/cgmanifest.json
index 637c7d2f5ab..01cdd8df5f1 100644
--- a/cgmanifest.json
+++ b/cgmanifest.json
@@ -6,7 +6,7 @@
"git": {
"name": "chromium",
"repositoryUrl": "https://chromium.googlesource.com/chromium/src",
- "commitHash": "7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33"
+ "commitHash": "164c37e3f235134c88e80fac2a182cfba3f07f00"
}
},
"licenseDetail": [
@@ -40,7 +40,7 @@
"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
],
"isOnlyProductionDependency": true,
- "version": "61.0.3163.100"
+ "version": "66.0.3359.181"
},
{
"component": {
@@ -48,12 +48,12 @@
"git": {
"name": "libchromiumcontent",
"repositoryUrl": "https://github.com/electron/libchromiumcontent",
- "commitHash": "ccdb085454b0a387ee96e0f81a7ca9a8ce07a710"
+ "commitHash": "7ea271f92018b1eeb8e70ec6de8c29f9758a0c05"
}
},
"isOnlyProductionDependency": true,
"license": "MIT",
- "version": "61.0.3163.100"
+ "version": "66.0.3359.181"
},
{
"component": {
@@ -61,11 +61,11 @@
"git": {
"name": "nodejs",
"repositoryUrl": "https://github.com/nodejs/node",
- "commitHash": "8a44289089a08b7b19fa3c4651b5f1f5d1edd71b"
+ "commitHash": "5cbb905c1af7cea2d709932d59827d7c6d03ef4a"
}
},
"isOnlyProductionDependency": true,
- "version": "8.9.3"
+ "version": "10.2.0"
},
{
"component": {
@@ -73,12 +73,12 @@
"git": {
"name": "electron",
"repositoryUrl": "https://github.com/electron/electron",
- "commitHash": "d281859cf59f12c7107a540a9f4cba0ecf5eff41"
+ "commitHash": "e84a6860e35e14b4031b88bb9b49841cdb89a305"
}
},
"isOnlyProductionDependency": true,
"license": "MIT",
- "version": "2.0.12"
+ "version": "3.1.8"
},
{
"component": {
@@ -105,6 +105,30 @@
"license": "MIT",
"version": "0.14.0"
},
+ {
+ "component": {
+ "type": "git",
+ "git": {
+ "name": "vscode-octicons-font",
+ "repositoryUrl": "https://github.com/Microsoft/vscode-octicons-font",
+ "commitHash": "4f69de3a233ed501c2098e33047e116ac2fbbf42"
+ }
+ },
+ "license": "MIT",
+ "version": "1.1.0"
+ },
+ {
+ "component": {
+ "type": "git",
+ "git": {
+ "name": "octicons",
+ "repositoryUrl": "https://github.com/primer/octicons",
+ "commitHash": "d120bf97bc9a12fb415f69fedaf31fe58427ca56"
+ }
+ },
+ "license": "MIT",
+ "version": "8.3.0"
+ },
{
"component": {
"type": "npm",
@@ -493,6 +517,19 @@
" defined by the Mozilla Public License, v. 2.0."
],
"license": "MPL"
+ },
+ {
+ "component": {
+ "type": "git",
+ "git": {
+ "name": "ripgrep",
+ "repositoryUrl": "https://github.com/BurntSushi/ripgrep",
+ "commitHash": "8a7db1a918e969b85cd933d8ed9fa5285b281ba4"
+ }
+ },
+ "isOnlyProductionDependency": true,
+ "license": "MIT",
+ "version": "0.10.0"
}
],
"version": 1
diff --git a/extensions/bat/cgmanifest.json b/extensions/bat/cgmanifest.json
index 32d7db263cc..5bc3e285f0c 100644
--- a/extensions/bat/cgmanifest.json
+++ b/extensions/bat/cgmanifest.json
@@ -6,12 +6,12 @@
"git": {
"name": "mmims/language-batchfile",
"repositoryUrl": "https://github.com/mmims/language-batchfile",
- "commitHash": "4b67596631b4ecd2c89c2ec1b2e08a6623438903"
+ "commitHash": "95ea8c699f7a8296b15767069868532d52631c46"
}
},
"license": "MIT",
- "version": "0.0.0"
+ "version": "0.7.5"
}
],
"version": 1
-}
+}
\ No newline at end of file
diff --git a/extensions/bat/syntaxes/batchfile.tmLanguage.json b/extensions/bat/syntaxes/batchfile.tmLanguage.json
index 26ae88f43c5..9eff3c9de2b 100644
--- a/extensions/bat/syntaxes/batchfile.tmLanguage.json
+++ b/extensions/bat/syntaxes/batchfile.tmLanguage.json
@@ -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/4b67596631b4ecd2c89c2ec1b2e08a6623438903",
+ "version": "https://github.com/mmims/language-batchfile/commit/95ea8c699f7a8296b15767069868532d52631c46",
"name": "Batch File",
"scopeName": "source.batchfile",
"patterns": [
@@ -46,7 +46,7 @@
"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|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)",
+ "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|scp|sc|schtasks|scwcmd|secedit|serverceipoptin|servrmanagercmd|serverweroptin|setspn|setx|sfc|shadow|shift|showmount|shutdown|sort|ssh|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"
},
{
diff --git a/extensions/clojure/cgmanifest.json b/extensions/clojure/cgmanifest.json
index bb14f456a9a..3a72fefb369 100644
--- a/extensions/clojure/cgmanifest.json
+++ b/extensions/clojure/cgmanifest.json
@@ -6,13 +6,13 @@
"git": {
"name": "atom/language-clojure",
"repositoryUrl": "https://github.com/atom/language-clojure",
- "commitHash": "ecc790326bc8e14220e4d2d72a392a30876c3219"
+ "commitHash": "de877502aa4a77ccdc2c7f0c9180436aea3effff"
}
},
"license": "MIT",
- "version": "0.0.0",
+ "version": "0.22.7",
"description": "The file syntaxes/clojure.tmLanguage.json was derived from the Atom package https://github.com/atom/language-clojure which was originally converted from the TextMate bundle https://github.com/mmcgrana/textmate-clojure."
}
],
"version": 1
-}
+}
\ No newline at end of file
diff --git a/extensions/clojure/syntaxes/clojure.tmLanguage.json b/extensions/clojure/syntaxes/clojure.tmLanguage.json
index 3d059513af0..29c25edfa24 100644
--- a/extensions/clojure/syntaxes/clojure.tmLanguage.json
+++ b/extensions/clojure/syntaxes/clojure.tmLanguage.json
@@ -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/atom/language-clojure/commit/ecc790326bc8e14220e4d2d72a392a30876c3219",
+ "version": "https://github.com/atom/language-clojure/commit/de877502aa4a77ccdc2c7f0c9180436aea3effff",
"name": "Clojure",
"scopeName": "source.clojure",
"patterns": [
@@ -83,7 +83,7 @@
"name": "constant.numeric.ratio.clojure"
},
{
- "match": "(-?\\d+[rR][0-9a-zA-Z]+)",
+ "match": "(-?\\d+[rR]\\w+)",
"name": "constant.numeric.arbitrary-radix.clojure"
},
{
@@ -116,17 +116,17 @@
]
},
"keyword": {
- "match": "(?<=(\\s|\\(|\\[|\\{)):[a-zA-Z0-9\\#\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}|\\,))",
+ "match": "(?<=(\\s|\\(|\\[|\\{)):[\\w\\#\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}|\\,))",
"name": "constant.keyword.clojure"
},
"keyfn": {
"patterns": [
{
- "match": "(?<=(\\s|\\(|\\[|\\{))(if(-[-a-z\\?]*)?|when(-[-a-z]*)?|for(-[-a-z]*)?|cond|do|let(-[-a-z\\?]*)?|binding|loop|recur|fn|throw[a-z\\-]*|try|catch|finally|([a-z]*case))(?=(\\s|\\)|\\]|\\}))",
+ "match": "(?<=(\\s|\\(|\\[|\\{))(if(-[-\\p{Ll}\\?]*)?|when(-[-\\p{Ll}]*)?|for(-[-\\p{Ll}]*)?|cond|do|let(-[-\\p{Ll}\\?]*)?|binding|loop|recur|fn|throw[\\p{Ll}\\-]*|try|catch|finally|([\\p{Ll}]*case))(?=(\\s|\\)|\\]|\\}))",
"name": "storage.control.clojure"
},
{
- "match": "(?<=(\\s|\\(|\\[|\\{))(declare-?|(in-)?ns|import|use|require|load|compile|(def[a-z\\-]*))(?=(\\s|\\)|\\]|\\}))",
+ "match": "(?<=(\\s|\\(|\\[|\\{))(declare-?|(in-)?ns|import|use|require|load|compile|(def[\\p{Ll}\\-]*))(?=(\\s|\\)|\\]|\\}))",
"name": "keyword.control.clojure"
}
]
@@ -309,7 +309,7 @@
"include": "#dynamic-variables"
},
{
- "match": "([a-zA-Z\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)",
+ "match": "([\\p{L}\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)",
"name": "entity.global.clojure"
},
{
@@ -387,7 +387,7 @@
"namespace-symbol": {
"patterns": [
{
- "match": "([a-zA-Z\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)/",
+ "match": "([\\p{L}\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)/",
"captures": {
"1": {
"name": "meta.symbol.namespace.clojure"
@@ -399,13 +399,13 @@
"symbol": {
"patterns": [
{
- "match": "([a-zA-Z\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)",
+ "match": "([\\p{L}\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)",
"name": "meta.symbol.clojure"
}
]
},
"var": {
- "match": "(?<=(\\s|\\(|\\[|\\{)\\#)'[a-zA-Z0-9\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}))",
+ "match": "(?<=(\\s|\\(|\\[|\\{)\\#)'[\\w\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}))",
"name": "meta.var.clojure"
},
"vector": {
diff --git a/extensions/coffeescript/cgmanifest.json b/extensions/coffeescript/cgmanifest.json
index b8f3fc4a771..3c792173e6e 100644
--- a/extensions/coffeescript/cgmanifest.json
+++ b/extensions/coffeescript/cgmanifest.json
@@ -6,13 +6,13 @@
"git": {
"name": "atom/language-coffee-script",
"repositoryUrl": "https://github.com/atom/language-coffee-script",
- "commitHash": "a0da2a73ad817e2fc13c2ef8fcd2624017c39610"
+ "commitHash": "0f6db9143663e18b1ad00667820f46747dba495e"
}
},
"license": "MIT",
"description": "The file syntaxes/coffeescript.tmLanguage.json was derived from the Atom package https://github.com/atom/language-coffee-script which was originally converted from the TextMate bundle https://github.com/jashkenas/coffee-script-tmbundle.",
- "version": "0.0.0"
+ "version": "0.49.3"
}
],
"version": 1
-}
+}
\ No newline at end of file
diff --git a/extensions/coffeescript/package.json b/extensions/coffeescript/package.json
index 2758bcdc50b..8d9293a8852 100644
--- a/extensions/coffeescript/package.json
+++ b/extensions/coffeescript/package.json
@@ -11,7 +11,7 @@
"contributes": {
"languages": [{
"id": "coffeescript",
- "extensions": [ ".coffee", ".cson" ],
+ "extensions": [ ".coffee", ".cson", ".iced" ],
"aliases": [ "CoffeeScript", "coffeescript", "coffee" ],
"configuration": "./language-configuration.json"
}],
diff --git a/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json b/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json
index 5fcff295c61..708856898bc 100644
--- a/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json
+++ b/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json
@@ -4,10 +4,13 @@
"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/atom/language-coffee-script/commit/a0da2a73ad817e2fc13c2ef8fcd2624017c39610",
+ "version": "https://github.com/atom/language-coffee-script/commit/0f6db9143663e18b1ad00667820f46747dba495e",
"name": "CoffeeScript",
"scopeName": "source.coffee",
"patterns": [
+ {
+ "include": "#jsx"
+ },
{
"match": "(new)\\s+(?:(?:(class)\\s+(\\w+(?:\\.\\w*)*)?)|(\\w+(?:\\.\\w*)*))",
"name": "meta.class.instance.constructor.coffee",
@@ -1213,6 +1216,101 @@
"include": "#embedded_comment"
}
]
+ },
+ "jsx": {
+ "patterns": [
+ {
+ "include": "#jsx-tag"
+ },
+ {
+ "include": "#jsx-end-tag"
+ }
+ ]
+ },
+ "jsx-expression": {
+ "begin": "{",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.brace.curly.coffee"
+ }
+ },
+ "end": "}",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.curly.coffee"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#double_quoted_string"
+ },
+ {
+ "include": "$self"
+ }
+ ]
+ },
+ "jsx-attribute": {
+ "patterns": [
+ {
+ "captures": {
+ "1": {
+ "name": "entity.other.attribute-name.coffee"
+ },
+ "2": {
+ "name": "keyword.operator.assignment.coffee"
+ }
+ },
+ "match": "(?:^|\\s+)([-\\w.]+)\\s*(=)"
+ },
+ {
+ "include": "#double_quoted_string"
+ },
+ {
+ "include": "#single_quoted_string"
+ },
+ {
+ "include": "#jsx-expression"
+ }
+ ]
+ },
+ "jsx-tag": {
+ "patterns": [
+ {
+ "begin": "(<)([-\\w\\.]+)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.coffee"
+ },
+ "2": {
+ "name": "entity.name.tag.coffee"
+ }
+ },
+ "end": "(/?>)",
+ "name": "meta.tag.coffee",
+ "patterns": [
+ {
+ "include": "#jsx-attribute"
+ }
+ ]
+ }
+ ]
+ },
+ "jsx-end-tag": {
+ "patterns": [
+ {
+ "begin": "()([-\\w\\.]+)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.coffee"
+ },
+ "2": {
+ "name": "entity.name.tag.coffee"
+ }
+ },
+ "end": "(/?>)",
+ "name": "meta.tag.coffee"
+ }
+ ]
}
}
}
\ No newline at end of file
diff --git a/extensions/configuration-editing/package.json b/extensions/configuration-editing/package.json
index 46f4eba3a95..bb9690a07d4 100644
--- a/extensions/configuration-editing/package.json
+++ b/extensions/configuration-editing/package.json
@@ -57,6 +57,10 @@
"fileMatch": "%APP_SETTINGS_HOME%/settings.json",
"url": "vscode://schemas/settings/user"
},
+ {
+ "fileMatch": "%MACHINE_SETTINGS_HOME%/settings.json",
+ "url": "vscode://schemas/settings/machine"
+ },
{
"fileMatch": "%APP_WORKSPACES_HOME%/*/workspace.json",
"url": "vscode://schemas/workspaceConfig"
@@ -96,6 +100,6 @@
]
},
"devDependencies": {
- "@types/node": "^8.10.25"
+ "@types/node": "^10.12.21"
}
}
diff --git a/extensions/configuration-editing/src/extension.ts b/extensions/configuration-editing/src/extension.ts
index b0a083e7e9e..913c5288809 100644
--- a/extensions/configuration-editing/src/extension.ts
+++ b/extensions/configuration-editing/src/extension.ts
@@ -3,12 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-import * as nls from 'vscode-nls';
-const localize = nls.loadMessageBundle();
-import * as vscode from 'vscode';
-import { getLocation, visit, parse, ParseErrorCode } from 'jsonc-parser';
+import { getLocation, parse, visit } from 'jsonc-parser';
import * as path from 'path';
+import * as vscode from 'vscode';
+import * as nls from 'vscode-nls';
import { SettingsDocument } from './settingsDocumentHelper';
+const localize = nls.loadMessageBundle();
const fadedDecoration = vscode.window.createTextEditorDecorationType({
light: {
@@ -22,9 +22,6 @@ const fadedDecoration = vscode.window.createTextEditorDecorationType({
let pendingLaunchJsonDecoration: NodeJS.Timer;
export function activate(context: vscode.ExtensionContext): void {
- //keybindings.json command-suggestions
- context.subscriptions.push(registerKeybindingsCompletions());
-
//settings.json suggestions
context.subscriptions.push(registerSettingsCompletions());
@@ -48,67 +45,6 @@ export function activate(context: vscode.ExtensionContext): void {
}
}, null, context.subscriptions));
updateLaunchJsonDecorations(vscode.window.activeTextEditor);
-
- context.subscriptions.push(vscode.workspace.onWillSaveTextDocument(e => {
- if (!e.document.fileName.endsWith('/settings.json')) {
- return;
- }
-
- autoFixSettingsJSON(e);
- }));
-}
-
-function autoFixSettingsJSON(willSaveEvent: vscode.TextDocumentWillSaveEvent): void {
- const document = willSaveEvent.document;
- const text = document.getText();
- const edit = new vscode.WorkspaceEdit();
-
- let lastEndOfSomething = -1;
- visit(text, {
- onArrayEnd(offset: number, length: number): void {
- lastEndOfSomething = offset + length;
- },
-
- onLiteralValue(_value: any, offset: number, length: number): void {
- lastEndOfSomething = offset + length;
- },
-
- onObjectEnd(offset: number, length: number): void {
- lastEndOfSomething = offset + length;
- },
-
- onError(error: ParseErrorCode, _offset: number, _length: number): void {
- if (error === ParseErrorCode.CommaExpected && lastEndOfSomething > -1) {
- const fixPosition = document.positionAt(lastEndOfSomething);
-
- // Don't insert a comma immediately before a : or ' :'
- const colonRange = document.getWordRangeAtPosition(fixPosition, / *:/);
- if (!colonRange) {
- edit.insert(document.uri, fixPosition, ',');
- }
- }
- }
- });
-
- willSaveEvent.waitUntil(
- vscode.workspace.applyEdit(edit));
-}
-
-function registerKeybindingsCompletions(): vscode.Disposable {
- const commands = vscode.commands.getCommands(true);
-
- return vscode.languages.registerCompletionItemProvider({ pattern: '**/keybindings.json' }, {
-
- provideCompletionItems(document, position, _token) {
- const location = getLocation(document.getText(), document.offsetAt(position));
- if (location.path[1] === 'command') {
-
- const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
- return commands.then(ids => ids.map(id => newSimpleCompletionItem(JSON.stringify(id), range)));
- }
- return undefined;
- }
- });
}
function registerSettingsCompletions(): vscode.Disposable {
@@ -207,16 +143,6 @@ function provideInstalledExtensionProposals(extensionsContent: IExtensionsConten
return undefined;
}
-function newSimpleCompletionItem(label: string, range: vscode.Range, description?: string, insertText?: string): vscode.CompletionItem {
- const item = new vscode.CompletionItem(label);
- item.kind = vscode.CompletionItemKind.Value;
- item.detail = description;
- item.insertText = insertText || label;
- item.range = range;
-
- return item;
-}
-
function updateLaunchJsonDecorations(editor: vscode.TextEditor | undefined): void {
if (!editor || path.basename(editor.document.fileName) !== 'launch.json') {
return;
diff --git a/extensions/configuration-editing/src/settingsDocumentHelper.ts b/extensions/configuration-editing/src/settingsDocumentHelper.ts
index e6b137809ff..d4ac414897d 100644
--- a/extensions/configuration-editing/src/settingsDocumentHelper.ts
+++ b/extensions/configuration-editing/src/settingsDocumentHelper.ts
@@ -44,8 +44,11 @@ export class SettingsDocument {
const completions: vscode.CompletionItem[] = [];
completions.push(this.newSimpleCompletionItem('${activeEditorShort}', range, localize('activeEditorShort', "the file name (e.g. myFile.txt)")));
- completions.push(this.newSimpleCompletionItem('${activeEditorMedium}', range, localize('activeEditorMedium', "the path of the file relative to the workspace folder (e.g. myFolder/myFile.txt)")));
- completions.push(this.newSimpleCompletionItem('${activeEditorLong}', range, localize('activeEditorLong', "the full path of the file (e.g. /Users/Development/myProject/myFolder/myFile.txt)")));
+ completions.push(this.newSimpleCompletionItem('${activeEditorMedium}', range, localize('activeEditorMedium', "the path of the file relative to the workspace folder (e.g. myFolder/myFileFolder/myFile.txt)")));
+ completions.push(this.newSimpleCompletionItem('${activeEditorLong}', range, localize('activeEditorLong', "the full path of the file (e.g. /Users/Development/myFolder/myFileFolder/myFile.txt)")));
+ completions.push(this.newSimpleCompletionItem('${activeFolderShort}', range, localize('activeFolderShort', "the name of the folder the file is contained in (e.g. myFileFolder)")));
+ completions.push(this.newSimpleCompletionItem('${activeFolderMedium}', range, localize('activeFolderMedium', "the path of the folder the file is contained in, relative to the workspace folder (e.g. myFolder/myFileFolder)")));
+ completions.push(this.newSimpleCompletionItem('${activeFolderLong}', range, localize('activeFolderLong', "the full path of the folder the file is contained in (e.g. /Users/Development/myFolder/myFileFolder)")));
completions.push(this.newSimpleCompletionItem('${rootName}', range, localize('rootName', "name of the workspace (e.g. myFolder or myWorkspace)")));
completions.push(this.newSimpleCompletionItem('${rootPath}', range, localize('rootPath', "file path of the workspace (e.g. /Users/Development/myWorkspace)")));
completions.push(this.newSimpleCompletionItem('${folderName}', range, localize('folderName', "name of the workspace folder the file is contained in (e.g. myFolder)")));
diff --git a/extensions/configuration-editing/yarn.lock b/extensions/configuration-editing/yarn.lock
index 752f2a3a6f9..49c47166066 100644
--- a/extensions/configuration-editing/yarn.lock
+++ b/extensions/configuration-editing/yarn.lock
@@ -2,10 +2,10 @@
# yarn lockfile v1
-"@types/node@^8.10.25":
- version "8.10.25"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.25.tgz#801fe4e39372cef18f268db880a5fbfcf71adc7e"
- integrity sha512-WXvAXaknB0c2cJ7N44e1kUrVu5K90mSfPPaT5XxfuSMxEWva86EYIwxUZM3jNZ2P1CIC9e2z4WJqpAF69PQxeA==
+"@types/node@^10.12.21":
+ version "10.12.21"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
+ integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
jsonc-parser@2.0.2:
version "2.0.2"
diff --git a/extensions/cpp/build/update-grammars.js b/extensions/cpp/build/update-grammars.js
index f02f51ca2cc..406b326156c 100644
--- a/extensions/cpp/build/update-grammars.js
+++ b/extensions/cpp/build/update-grammars.js
@@ -6,8 +6,8 @@
var updateGrammar = require('../../../build/npm/update-grammar');
-updateGrammar.update('atom/language-c', 'grammars/c.cson', './syntaxes/c.tmLanguage.json');
-updateGrammar.update('atom/language-c', 'grammars/c%2B%2B.cson', './syntaxes/cpp.tmLanguage.json');
+updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/c.tmLanguage.json', './syntaxes/c.tmLanguage.json');
+updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/cpp.tmLanguage.json', './syntaxes/cpp.tmLanguage.json');
// `source.c.platform` which is still included by other grammars
updateGrammar.update('textmate/c.tmbundle', 'Syntaxes/Platform.tmLanguage', './syntaxes/platform.tmLanguage.json');
diff --git a/extensions/cpp/cgmanifest.json b/extensions/cpp/cgmanifest.json
index 16d849387cd..a1b745d8a43 100644
--- a/extensions/cpp/cgmanifest.json
+++ b/extensions/cpp/cgmanifest.json
@@ -4,14 +4,14 @@
"component": {
"type": "git",
"git": {
- "name": "atom/language-c",
- "repositoryUrl": "https://github.com/atom/language-c",
- "commitHash": "9c0c5f202741a5647025db8d5df5fefba47b036c"
+ "name": "jeff-hykin/cpp-textmate-grammar",
+ "repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
+ "commitHash": "dc404ccf4eb08a5f76434e759b519f59051a32e5"
}
},
"license": "MIT",
- "version": "0.0.0",
- "description": "The files syntaxes/c.json and syntaxes/c++.json were derived from the Atom package https://atom.io/packages/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
+ "version": "1.8.13",
+ "description": "The files syntaxes/c.json and syntaxes/c++.json were derived from https://github.com/atom/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
},
{
"component": {
@@ -42,4 +42,4 @@
}
],
"version": 1
-}
+}
\ No newline at end of file
diff --git a/extensions/cpp/syntaxes/c.tmLanguage.json b/extensions/cpp/syntaxes/c.tmLanguage.json
index bcd5470a64c..ec2ee36d25d 100644
--- a/extensions/cpp/syntaxes/c.tmLanguage.json
+++ b/extensions/cpp/syntaxes/c.tmLanguage.json
@@ -1,10 +1,10 @@
{
"information_for_contributors": [
- "This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c.cson",
+ "This file has been converted from https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master//syntaxes/c.tmLanguage.json",
"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/atom/language-c/commit/9c0c5f202741a5647025db8d5df5fefba47b036c",
+ "version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/48734a7a8b365c12aeb7551aed0090b49601ed70",
"name": "C",
"scopeName": "source.c",
"patterns": [
@@ -21,12 +21,19 @@
"include": "#comments"
},
{
- "match": "\\b(break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while)\\b",
+ "include": "#switch_statement"
+ },
+ {
+ "match": "\\b(break|continue|do|else|for|goto|if|_Pragma|return|while)\\b",
"name": "keyword.control.c"
},
{
"include": "#storage_types"
},
+ {
+ "match": "typedef",
+ "name": "keyword.other.typedef.c"
+ },
{
"match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b",
"name": "storage.modifier.c"
@@ -57,7 +64,7 @@
"include": "#strings"
},
{
- "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?[a-zA-Z_$][\\w$]*)) # macro name\n(?:\n (\\()\n (\n \\s* \\g \\s* # first argument\n ((,) \\s* \\g \\s*)* # additional arguments\n (?:\\.\\.\\.)? # varargs ellipsis?\n )\n (\\))\n)?",
+ "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+\t# define\n((?[a-zA-Z_$][\\w$]*))\t # macro name\n(?:\n (\\()\n\t(\n\t \\s* \\g \\s*\t\t # first argument\n\t ((,) \\s* \\g \\s*)* # additional arguments\n\t (?:\\.\\.\\.)?\t\t\t# varargs ellipsis?\n\t)\n (\\))\n)?",
"beginCaptures": {
"1": {
"name": "keyword.control.directive.define.c"
@@ -90,8 +97,8 @@
]
},
{
- "begin": "^\\s*((#)\\s*(error|warning))\\b",
- "captures": {
+ "begin": "^\\s*((#)\\s*(error|warning))\\b\\s*",
+ "beginCaptures": {
"1": {
"name": "keyword.control.directive.diagnostic.$3.c"
},
@@ -99,17 +106,61 @@
"name": "punctuation.definition.directive.c"
}
},
- "end": "(?=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)",
- "end": "(?<=\\))(?!\\w)",
"name": "meta.function.c",
+ "begin": "(?\\]\\)]))\\s*([a-zA-Z_]\\w*)\\s*(?=(?:\\[\\]\\s*)?(?:,|\\)))",
"captures": {
+ "1": {
+ "name": "variable.parameter.probably.c"
+ }
+ }
+ },
+ "access-method": {
+ "name": "meta.function-call.member.c",
+ "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))\\s*(?:(\\.)|(->))((?:(?:[a-zA-Z_][a-zA-Z_0-9]*)\\s*(?:(?:\\.)|(?:->)))*)\\s*([a-zA-Z_][a-zA-Z_0-9]*)(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "variable.object.c"
+ },
"2": {
"name": "punctuation.separator.dot-access.c"
},
@@ -311,10 +391,43 @@
"name": "punctuation.separator.pointer-access.c"
},
"4": {
- "name": "variable.other.member.c"
+ "patterns": [
+ {
+ "match": "\\.",
+ "name": "punctuation.separator.dot-access.c"
+ },
+ {
+ "match": "->",
+ "name": "punctuation.separator.pointer-access.c"
+ },
+ {
+ "match": "[a-zA-Z_][a-zA-Z_0-9]*",
+ "name": "variable.object.c"
+ },
+ {
+ "name": "everything.else.c",
+ "match": ".+"
+ }
+ ]
+ },
+ "5": {
+ "name": "entity.name.function.member.c"
+ },
+ "6": {
+ "name": "punctuation.section.arguments.begin.bracket.round.function.member.c"
}
},
- "match": "((\\.)|(->))\\s*(([a-zA-Z_][a-zA-Z_0-9]*)\\b(?!\\s*\\())?"
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.arguments.end.bracket.round.function.member.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function-call-innards"
+ }
+ ]
},
"block": {
"patterns": [
@@ -352,25 +465,36 @@
"include": "#preprocessor-rule-conditional-block"
},
{
- "include": "#access"
+ "include": "#method_access"
},
{
- "include": "#libc"
+ "include": "#member_access"
},
{
"include": "#c_function_call"
},
{
- "captures": {
+ "name": "meta.initialization.c",
+ "begin": "(?x)\n(?:\n (?:\n\t(?=\\s)(?=+!]+ | \\(\\) | \\[\\]))\n)\n\\s*(\\() # opening bracket",
+ "beginCaptures": {
"1": {
"name": "variable.other.c"
},
"2": {
- "name": "punctuation.definition.parameters.c"
+ "name": "punctuation.section.parens.begin.bracket.round.initialization.c"
}
},
- "match": "(?x)\n(?:\n (?:\n (?=\\s)(?=+!]+ | \\(\\) | \\[\\]))\n)\n\\s*(\\() # opening bracket",
- "name": "meta.initialization.c"
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.end.bracket.round.initialization.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function-call-innards"
+ }
+ ]
},
{
"begin": "{",
@@ -400,7 +524,7 @@
]
},
"c_function_call": {
- "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate)\\s*\\()\n(?=\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)",
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(?=\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)",
"end": "(?<=\\))(?!\\w)",
"name": "meta.function-call.c",
"patterns": [
@@ -446,13 +570,13 @@
}
},
"match": "^// =(\\s*.*?)\\s*=\\s*$\\n?",
- "name": "comment.line.banner.cpp"
+ "name": "comment.line.banner.c"
},
{
"begin": "(^[ \\t]+)?(?=//)",
"beginCaptures": {
"1": {
- "name": "punctuation.whitespace.comment.leading.cpp"
+ "name": "punctuation.whitespace.comment.leading.c"
}
},
"end": "(?!\\G)",
@@ -461,11 +585,11 @@
"begin": "//",
"beginCaptures": {
"0": {
- "name": "punctuation.definition.comment.cpp"
+ "name": "punctuation.definition.comment.c"
}
},
"end": "(?=\\n)",
- "name": "comment.line.double-slash.cpp",
+ "name": "comment.line.double-slash.c",
"patterns": [
{
"include": "#line_continuation_character"
@@ -488,17 +612,6 @@
}
]
},
- "libc": {
- "captures": {
- "1": {
- "name": "punctuation.whitespace.support.function.leading.c"
- },
- "2": {
- "name": "support.function.C99.c"
- }
- },
- "match": "(?x) (\\s*) \\b\n(_Exit|(?:nearbyint|nextafter|nexttoward|netoward|nan)[fl]?|a(?:cos|sin)h?[fl]?|abort|abs|asctime|assert\n|atan(?:[h2]?[fl]?)?|atexit|ato[ifl]|atoll|bsearch|btowc|cabs[fl]?|cacos|cacos[fl]|cacosh[fl]?\n|calloc|carg[fl]?|casinh?[fl]?|catanh?[fl]?|cbrt[fl]?|ccosh?[fl]?|ceil[fl]?|cexp[fl]?|cimag[fl]?\n|clearerr|clock|clog[fl]?|conj[fl]?|copysign[fl]?|cosh?[fl]?|cpow[fl]?|cproj[fl]?|creal[fl]?\n|csinh?[fl]?|csqrt[fl]?|ctanh?[fl]?|ctime|difftime|div|erfc?[fl]?|exit|fabs[fl]?\n|exp(?:2[fl]?|[fl]|m1[fl]?)?|fclose|fdim[fl]?|fe[gs]et(?:env|exceptflag|round)|feclearexcept\n|feholdexcept|feof|feraiseexcept|ferror|fetestexcept|feupdateenv|fflush|fgetpos|fgetw?[sc]\n|floor[fl]?|fmax?[fl]?|fmin[fl]?|fmod[fl]?|fopen|fpclassify|fprintf|fputw?[sc]|fread|free|freopen\n|frexp[fl]?|fscanf|fseek|fsetpos|ftell|fwide|fwprintf|fwrite|fwscanf|genv|get[sc]|getchar|gmtime\n|gwc|gwchar|hypot[fl]?|ilogb[fl]?|imaxabs|imaxdiv|isalnum|isalpha|isblank|iscntrl|isdigit|isfinite\n|isgraph|isgreater|isgreaterequal|isinf|isless(?:equal|greater)?|isw?lower|isnan|isnormal|isw?print\n|isw?punct|isw?space|isunordered|isw?upper|iswalnum|iswalpha|iswblank|iswcntrl|iswctype|iswdigit|iswgraph\n|isw?xdigit|labs|ldexp[fl]?|ldiv|lgamma[fl]?|llabs|lldiv|llrint[fl]?|llround[fl]?|localeconv|localtime\n|log[2b]?[fl]?|log1[p0][fl]?|longjmp|lrint[fl]?|lround[fl]?|malloc|mbr?len|mbr?towc|mbsinit|mbsrtowcs\n|mbstowcs|memchr|memcmp|memcpy|memmove|memset|mktime|modf[fl]?|perror|pow[fl]?|printf|puts|putw?c(?:har)?\n|qsort|raise|rand|remainder[fl]?|realloc|remove|remquo[fl]?|rename|rewind|rint[fl]?|round[fl]?|scalbl?n[fl]?\n|scanf|setbuf|setjmp|setlocale|setvbuf|signal|signbit|sinh?[fl]?|snprintf|sprintf|sqrt[fl]?|srand|sscanf\n|strcat|strchr|strcmp|strcoll|strcpy|strcspn|strerror|strftime|strlen|strncat|strncmp|strncpy|strpbrk\n|strrchr|strspn|strstr|strto[kdf]|strtoimax|strtol[dl]?|strtoull?|strtoumax|strxfrm|swprintf|swscanf\n|system|tan|tan[fl]|tanh[fl]?|tgamma[fl]?|time|tmpfile|tmpnam|tolower|toupper|trunc[fl]?|ungetw?c|va_arg\n|va_copy|va_end|va_start|vfw?printf|vfw?scanf|vprintf|vscanf|vsnprintf|vsprintf|vsscanf|vswprintf|vswscanf\n|vwprintf|vwscanf|wcrtomb|wcscat|wcschr|wcscmp|wcscoll|wcscpy|wcscspn|wcsftime|wcslen|wcsncat|wcsncmp|wcsncpy\n|wcspbrk|wcsrchr|wcsrtombs|wcsspn|wcsstr|wcsto[dkf]|wcstoimax|wcstol[dl]?|wcstombs|wcstoull?|wcstoumax|wcsxfrm\n|wctom?b|wmem(?:set|chr|cpy|cmp|move)|wprintf|wscanf)\\b"
- },
"line_continuation_character": {
"patterns": [
{
@@ -511,15 +624,8 @@
}
]
},
- "numbers": {
- "patterns": [
- {
- "match": "\\b((0(x|X)[0-9a-fA-F]([0-9a-fA-F']*[0-9a-fA-F])?)|(0(b|B)[01]([01']*[01])?)|(([0-9]([0-9']*[0-9])?\\.?[0-9]*([0-9']*[0-9])?)|(\\.[0-9]([0-9']*[0-9])?))((e|E)(\\+|-)?[0-9]([0-9']*[0-9])?)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b",
- "name": "constant.numeric.c"
- }
- ]
- },
"parens": {
+ "name": "meta.parens.c",
"begin": "\\(",
"beginCaptures": {
"0": {
@@ -539,6 +645,7 @@
]
},
"parens-block": {
+ "name": "meta.parens.block.c",
"begin": "\\(",
"beginCaptures": {
"0": {
@@ -554,6 +661,10 @@
"patterns": [
{
"include": "#block_innards"
+ },
+ {
+ "match": "(?-mix:(?=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)",
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()\n(?=\n (?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n |\n (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)",
"end": "(?<=\\))(?!\\w)|(?=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()",
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()",
"beginCaptures": {
"1": {
"name": "entity.name.function.c"
@@ -1846,7 +1961,8 @@
"include": "#vararg_ellipses"
},
{
- "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()",
+ "name": "meta.function.definition.parameters.c",
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()",
"beginCaptures": {
"1": {
"name": "entity.name.function.c"
@@ -1862,6 +1978,9 @@
}
},
"patterns": [
+ {
+ "include": "#probably_a_parameter"
+ },
{
"include": "#function-innards"
}
@@ -1900,13 +2019,16 @@
"include": "#storage_types"
},
{
- "include": "#access"
+ "include": "#method_access"
+ },
+ {
+ "include": "#member_access"
},
{
"include": "#operators"
},
{
- "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()",
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()",
"beginCaptures": {
"1": {
"name": "entity.name.function.c"
@@ -1950,6 +2072,518 @@
"include": "#block_innards"
}
]
+ },
+ "default_statement": {
+ "name": "meta.conditional.case.c",
+ "begin": "((?\\[\\]=]))",
+ "patterns": [
+ {
+ "name": "meta.head.switch.c",
+ "begin": "\\G ?",
+ "end": "((?:\\{|(?=;)))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.begin.bracket.curly.switch.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#switch_conditional_parentheses"
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "name": "meta.body.switch.c",
+ "begin": "(?<=\\{)",
+ "end": "(\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.end.bracket.curly.switch.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#default_statement"
+ },
+ {
+ "include": "#case_statement"
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "name": "meta.tail.switch.c",
+ "begin": "(?<=})[\\s\\n]*",
+ "end": "[\\s\\n]*(?=;)",
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ }
+ ]
+ },
+ "switch_conditional_parentheses": {
+ "name": "meta.conditional.switch.c",
+ "begin": "(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.c"
+ }
+ },
+ "end": "(\\))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.parens.end.bracket.round.conditional.switch.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#conditional_context"
+ }
+ ]
+ },
+ "static_assert": {
+ "begin": "(static_assert|_Static_assert)\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.other.static_assert.c"
+ },
+ "2": {
+ "name": "punctuation.section.arguments.begin.bracket.round.c"
+ }
+ },
+ "end": "(\\))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.arguments.end.bracket.round.c"
+ }
+ },
+ "patterns": [
+ {
+ "name": "meta.static_assert.message.c",
+ "begin": "(,)\\s*(?=(?:L|u8|u|U\\s*\\\")?)",
+ "beginCaptures": {
+ "1": {
+ "name": "comma.c punctuation.separator.delimiter.c"
+ }
+ },
+ "end": "(?=\\))",
+ "patterns": [
+ {
+ "include": "#string_context"
+ },
+ {
+ "include": "#string_context_c"
+ }
+ ]
+ },
+ {
+ "include": "#function_call_context_c"
+ }
+ ]
+ },
+ "conditional_context": {
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ "member_access": {
+ "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t))[a-zA-Z_]\\w*\\b(?!\\())",
+ "captures": {
+ "1": {
+ "name": "variable.other.object.access.c"
+ },
+ "2": {
+ "name": "punctuation.separator.dot-access.c"
+ },
+ "3": {
+ "name": "punctuation.separator.pointer-access.c"
+ },
+ "4": {
+ "patterns": [
+ {
+ "include": "#member_access"
+ },
+ {
+ "include": "#method_access"
+ },
+ {
+ "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))",
+ "captures": {
+ "1": {
+ "name": "variable.other.object.access.c"
+ },
+ "2": {
+ "name": "punctuation.separator.dot-access.c"
+ },
+ "3": {
+ "name": "punctuation.separator.pointer-access.c"
+ }
+ }
+ }
+ ]
+ },
+ "5": {
+ "name": "variable.other.member.c"
+ }
+ }
+ },
+ "method_access": {
+ "contentName": "meta.function-call.member",
+ "begin": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "variable.other.object.access.c"
+ },
+ "2": {
+ "name": "punctuation.separator.dot-access.c"
+ },
+ "3": {
+ "name": "punctuation.separator.pointer-access.c"
+ },
+ "4": {
+ "patterns": [
+ {
+ "include": "#member_access"
+ },
+ {
+ "include": "#method_access"
+ },
+ {
+ "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))",
+ "captures": {
+ "1": {
+ "name": "variable.other.object.access.c"
+ },
+ "2": {
+ "name": "punctuation.separator.dot-access.c"
+ },
+ "3": {
+ "name": "punctuation.separator.pointer-access.c"
+ }
+ }
+ }
+ ]
+ },
+ "5": {
+ "name": "entity.name.function.member.c"
+ },
+ "6": {
+ "name": "punctuation.section.arguments.begin.bracket.round.function.member.c"
+ }
+ },
+ "end": "(\\))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.arguments.end.bracket.round.function.member.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function-call-innards"
+ }
+ ]
+ },
+ "numbers": {
+ "begin": "(?",
- "name": "meta.angle-brackets.cpp",
+ "sizeof_operator": {
+ "contentName": "meta.arguments.operator.sizeof",
+ "begin": "((?\\[\\]=]))",
+ "patterns": [
+ {
+ "name": "meta.head.switch.cpp",
+ "begin": "\\G ?",
+ "end": "((?:\\{|(?=;)))",
+ "endCaptures": {
"1": {
- "name": "entity.name.function.cpp"
+ "name": "punctuation.section.block.begin.bracket.curly.switch.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#switch_conditional_parentheses"
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "name": "meta.body.switch.cpp",
+ "begin": "(?<=\\{)",
+ "end": "(\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.end.bracket.curly.switch.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#default_statement"
+ },
+ {
+ "include": "#case_statement"
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "name": "meta.tail.switch.cpp",
+ "begin": "(?<=})[\\s\\n]*",
+ "end": "[\\s\\n]*(?=;)",
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ }
+ ]
+ },
+ "attributes": {
+ "name": "support.other.attribute.cpp",
+ "begin": "((?:\\[\\[|__attribute\\(\\(|__attribute__\\(\\(|__declspec\\())",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.section.attribute.begin.cpp"
+ }
+ },
+ "end": "((?:\\]\\]|\\)\\)|\\)))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.attribute.end.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#attributes"
+ },
+ {
+ "begin": "\\(",
+ "end": "\\)",
+ "patterns": [
+ {
+ "include": "#attributes"
+ },
+ {
+ "include": "#string_context_c"
+ }
+ ]
+ },
+ {
+ "match": "(using)\\s+((?:,\\w])*>\\s*",
+ "captures": {
+ "0": {
+ "name": "meta.template.call.cpp",
+ "patterns": [
+ {
+ "include": "#template_call_context"
+ }
+ ]
+ }
+ }
+ },
+ "template_call_range": {
+ "name": "meta.template.call.cpp",
+ "begin": "(<)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.section.angle-brackets.begin.template.call.cpp"
+ }
+ },
+ "end": "(>)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.angle-brackets.end.template.call.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#template_call_context"
+ }
+ ]
+ },
+ "template_isolated_definition": {
+ "match": "(?\\s*$)",
+ "captures": {
+ "1": {
+ "name": "storage.type.template.cpp"
+ },
+ "2": {
+ "name": "punctuation.section.angle-brackets.start.template.definition.cpp"
+ },
+ "3": {
+ "name": "meta.template.definition.cpp",
+ "patterns": [
+ {
+ "include": "#template_definition_context"
+ }
+ ]
+ },
+ "4": {
+ "name": "punctuation.section.angle-brackets.end.template.definition.cpp"
+ }
+ }
+ },
+ "template_definition": {
+ "name": "meta.template.definition.cpp",
+ "begin": "(?)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.angle-brackets.end.template.definition.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "begin": "((?<=\\w)\\s*<)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.section.angle-brackets.begin.template.call.cpp"
}
},
- "end": "\\)",
+ "end": "(>)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.angle-brackets.begin.template.call.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#template_call_context"
+ }
+ ]
+ },
+ {
+ "include": "#template_definition_context"
+ }
+ ]
+ },
+ "template_argument_defaulted": {
+ "match": "(?<=<|,)\\s*((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*\\s+)*)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*([=])",
+ "captures": {
+ "1": {
+ "name": "storage.type.template.cpp"
+ },
+ "2": {
+ "name": "entity.name.type.template.cpp"
+ },
+ "3": {
+ "name": "keyword.operator.assignment.cpp"
+ }
+ }
+ },
+ "template_definition_argument": {
+ "match": "(?:(?:\\s*((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)|((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*\\s+)+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*))|((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(\\.\\.\\.)\\s*((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*))\\s*(?:(,)|(?=>|$))",
+ "captures": {
+ "1": {
+ "name": "storage.type.template.argument.$1.cpp"
+ },
+ "2": {
+ "name": "storage.type.template.argument.$2.cpp"
+ },
+ "3": {
+ "name": "entity.name.type.template.cpp"
+ },
+ "4": {
+ "name": "storage.type.template.cpp"
+ },
+ "5": {
+ "name": "ellipses.cpp punctuation.vararg-ellipses.template.definition.cpp"
+ },
+ "6": {
+ "name": "entity.name.type.template.cpp"
+ },
+ "7": {
+ "name": "comma.cpp punctuation.separator.template.argument.cpp"
+ }
+ }
+ },
+ "scope_resolution": {
+ "match": "((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*\\s*(?:(?-mix:(?:(?:,\\w])*>\\s*)))?::)*\\s*)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(?:((?:,\\w])*>\\s*))?(::)",
+ "captures": {
+ "1": {
+ "patterns": [
+ {
+ "include": "#scope_resolution"
+ }
+ ]
+ },
+ "2": {
+ "name": "entity.name.type.namespace.scope-resolution.cpp"
+ },
+ "3": {
+ "name": "meta.template.call.cpp",
+ "patterns": [
+ {
+ "include": "#template_call_context"
+ }
+ ]
+ },
+ "4": {
+ "name": "punctuation.separator.namespace.access.cpp"
+ }
+ },
+ "name": "meta.scope-resolution.cpp"
+ },
+ "qualified_type": {
+ "match": "\\s*(?:,\\w])*>\\s*)))?::)*\\s*)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(?:((?:,\\w])*>\\s*))?(::)))?\\s*(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*(?:(?-mix:(?:(?:,\\w])*>\\s*)))?(?![\\w<:.])",
+ "captures": {
+ "0": {
+ "name": "entity.name.type.cpp meta.qualified_type.cpp",
+ "patterns": [
+ {
+ "match": "(?:class|struct|union|enum)",
+ "name": "storage.type.$0.cpp"
+ },
+ {
+ "include": "#function_type"
+ },
+ {
+ "include": "#storage_types"
+ },
+ {
+ "include": "#number_literal"
+ },
+ {
+ "include": "#string_context_c"
+ },
+ {
+ "include": "#comma"
+ }
+ ]
+ },
+ "1": {
+ "patterns": [
+ {
+ "include": "#attributes"
+ }
+ ]
+ },
+ "2": {
+ "name": "meta.scope-resolution.cpp"
+ },
+ "3": {
+ "patterns": [
+ {
+ "include": "#scope_resolution"
+ }
+ ]
+ },
+ "4": {
+ "name": "entity.name.type.namespace.scope-resolution.cpp"
+ },
+ "5": {
+ "name": "meta.template.call.cpp",
+ "patterns": [
+ {
+ "include": "#template_call_context"
+ }
+ ]
+ },
+ "6": {
+ "name": "punctuation.separator.namespace.access.cpp"
+ }
+ }
+ },
+ "type_alias": {
+ "match": "(using)\\s*(?!namespace)(\\s*(?:,\\w])*>\\s*)))?::)*\\s*)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(?:((?:,\\w])*>\\s*))?(::)))?\\s*(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*(?:(?-mix:(?:(?:,\\w])*>\\s*)))?(?![\\w<:.]))\\s*(\\=)\\s*(typename)?\\s*((?:(?-mix:(?:(?:,\\w])*>\\s*)))?::)*\\s*)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(?:((?:,\\w])*>\\s*))?(::)))?\\s*(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*(?:(?-mix:(?:(?:,\\w])*>\\s*)))?(?![\\w<:.]))|(.+(?:,\\w])*>\\s*)))?::)*\\s*)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(?:((?:,\\w])*>\\s*))?(\\()",
+ "beginCaptures": {
+ "1": {
+ "patterns": [
+ {
+ "include": "#scope_resolution"
+ }
+ ]
+ },
+ "2": {
+ "name": "entity.name.function.call.cpp"
+ },
+ "3": {
+ "name": "meta.template.call.cpp",
+ "patterns": [
+ {
+ "include": "#template_call_context"
+ }
+ ]
+ },
+ "4": {
+ "name": "punctuation.section.arguments.begin.bracket.round.cpp"
+ }
+ },
+ "end": "(\\))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.arguments.end.bracket.round.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function_call_context_c"
+ }
+ ]
+ },
+ "legacy_function_definition": {
+ "name": "meta.function.definition.parameters.cpp",
+ "begin": "(?!(?:(?:::|\\+\\+|\\-\\-|\\(\\)|\\[\\]|\\.|\\->|\\+\\+|\\-\\-|\\+|\\-|!|not|~|compl|\\*|&|sizeof|sizeof\\.\\.\\.|new|new\\[\\]|delete|delete\\[\\]|\\.\\*|\\->\\*|\\*|\\/|%|\\+|\\-|<<|>>|<=>|<|<=|>|>=|==|!=|not_eq|&|bitand|\\^|xor|\\||bitor|&&|and|\\|\\||or|\\?:|throw|=|\\+=|\\-=|\\*=|\\/=|%=|<<=|>>=|&=|and_eq|\\^=|xor_eq|\\|=|or_eq|,|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast)|(?:throw|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default))\\s*\\()((?:(?:(?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*|::))+|(?<=operator)(?:\\+\\+|\\-\\-|\\(\\)|\\[\\]|\\->|\\+\\+|\\-\\-|\\+|\\-|!|~|\\*|&|new|new\\[\\]|delete|delete\\[\\]|\\->\\*|\\*|\\/|%|\\+|\\-|<<|>>|<=>|<|<=|>|>=|==|!=|&|\\^|\\||&&|\\|\\||=|\\+=|\\-=|\\*=|\\/=|%=|<<=|>>=|&=|\\^=|\\|=|,)))\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "entity.name.function.cpp"
+ },
+ "2": {
+ "name": "punctuation.section.parameters.begin.bracket.round.cpp"
+ }
+ },
+ "end": "(\\)|:)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.parameters.end.bracket.round.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#probably_a_parameter"
+ },
+ {
+ "include": "#function_context_c"
+ }
+ ]
+ },
+ "operators": {
+ "patterns": [
+ {
+ "include": "#sizeof_operator"
+ },
+ {
+ "include": "#alignof_operator"
+ },
+ {
+ "include": "#alignas_operator"
+ },
+ {
+ "include": "#typeid_operator"
+ },
+ {
+ "include": "#decltype_specifier"
+ },
+ {
+ "match": "(?>=|\\|=",
+ "name": "keyword.operator.assignment.compound.bitwise.cpp"
+ },
+ {
+ "match": "<<|>>",
+ "name": "keyword.operator.bitwise.shift.cpp"
+ },
+ {
+ "match": "!=|<=|>=|==|<|>",
+ "name": "keyword.operator.comparison.cpp"
+ },
+ {
+ "match": "&&|!|\\|\\|",
+ "name": "keyword.operator.logical.cpp"
+ },
+ {
+ "match": "&|\\||\\^|~",
+ "name": "keyword.operator.cpp"
+ },
+ {
+ "include": "#assignment_operator"
+ },
+ {
+ "match": "%|\\*|/|-|\\+",
+ "name": "keyword.operator.cpp"
+ },
+ {
+ "begin": "\\?",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.ternary.cpp"
+ }
+ },
+ "end": ":",
+ "applyEndPatternLast": true,
"endCaptures": {
"0": {
- "name": "punctuation.definition.parameters.end.c"
+ "name": "keyword.operator.ternary.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#method_access"
+ },
+ {
+ "include": "#member_access"
+ },
+ {
+ "include": "#function_call_c"
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ }
+ ]
+ },
+ "function_pointer": {
+ "begin": "(\\s*(?:,\\w])*>\\s*)))?::)*\\s*)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(?:((?:,\\w])*>\\s*))?(::)))?\\s*(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*(?:(?-mix:(?:(?:,\\w])*>\\s*)))?(?![\\w<:.]))\\s*(((?:\\*\\s*)*)((?:\\&\\s*?){0,2})\\s*)(\\()(\\*)\\s*((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)?\\s*(?:(\\[)(\\w*)(\\])\\s*)*(\\))\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "entity.name.type.cpp meta.qualified_type.cpp",
+ "patterns": [
+ {
+ "match": "(?:class|struct|union|enum)",
+ "name": "storage.type.$0.cpp"
+ },
+ {
+ "include": "#function_type"
+ },
+ {
+ "include": "#storage_types"
+ },
+ {
+ "include": "#number_literal"
+ },
+ {
+ "include": "#string_context_c"
+ },
+ {
+ "include": "#comma"
+ }
+ ]
+ },
+ "2": {
+ "patterns": [
+ {
+ "include": "#attributes"
+ }
+ ]
+ },
+ "3": {
+ "name": "meta.scope-resolution.cpp"
+ },
+ "4": {
+ "patterns": [
+ {
+ "include": "#scope_resolution"
+ }
+ ]
+ },
+ "5": {
+ "name": "entity.name.type.namespace.scope-resolution.cpp"
+ },
+ "6": {
+ "name": "meta.template.call.cpp",
+ "patterns": [
+ {
+ "include": "#template_call_context"
+ }
+ ]
+ },
+ "7": {
+ "name": "punctuation.separator.namespace.access.cpp"
+ },
+ "9": {
+ "name": "storage.modifier.pointer.cpp"
+ },
+ "10": {
+ "name": "storage.modifier.reference.cpp"
+ },
+ "11": {
+ "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp"
+ },
+ "12": {
+ "name": "punctuation.definition.function.pointer.dereference.cpp"
+ },
+ "13": {
+ "name": "variable.other.definition.pointer.function.cpp"
+ },
+ "14": {
+ "name": "punctuation.definition.begin.bracket.square.cpp"
+ },
+ "15": {
+ "patterns": [
+ {
+ "include": "#evaluation_context"
+ }
+ ]
+ },
+ "16": {
+ "name": "punctuation.definition.end.bracket.square.cpp"
+ },
+ "17": {
+ "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp"
+ },
+ "18": {
+ "name": "punctuation.section.parameters.begin.bracket.round.function.pointer.cpp"
+ }
+ },
+ "end": "(\\))\\s*(?=[{=,);]|\\n)(?!\\()",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.parameters.end.bracket.round.function.pointer.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter_struct"
+ },
+ {
+ "include": "#probably_a_parameter"
+ },
+ {
+ "include": "#function_context_c"
+ }
+ ]
+ },
+ "probably_a_parameter": {
+ "match": "(?:((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*\\s*(?==))|((?<=\\w |\\*\\/|[&*>\\]\\)]|\\.\\.\\.)\\s*(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*\\s*(?=(?:\\[\\]\\s*)?(?:,|\\)))))",
+ "captures": {
+ "1": {
+ "name": "variable.parameter.defaulted.cpp"
+ },
+ "2": {
+ "name": "variable.parameter.cpp"
+ }
+ }
+ },
+ "operator_overload": {
+ "name": "meta.function.definition.parameters.operator-overload.cpp",
+ "begin": "(operator)((?:\\s*(?:\\+\\+|\\-\\-|\\(\\)|\\[\\]|\\->|\\+\\+|\\-\\-|\\+|\\-|!|~|\\*|&|\\->\\*|\\*|\\/|%|\\+|\\-|<<|>>|<=>|<|<=|>|>=|==|!=|&|\\^|\\||&&|\\|\\||=|\\+=|\\-=|\\*=|\\/=|%=|<<=|>>=|&=|\\^=|\\|=|,)|\\s+(?:(?:new|new\\[\\]|delete|delete\\[\\])|(?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*\\s*(?:(?-mix:(?:(?:,\\w])*>\\s*)))?::)*(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*\\s*(?:&)?)))\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.other.operator.overload.cpp"
+ },
+ "2": {
+ "name": "entity.name.operator.overloadee.cpp",
+ "patterns": [
+ {
+ "include": "#scope_resolution"
+ }
+ ]
+ },
+ "3": {
+ "name": "punctuation.section.parameters.begin.bracket.round.operator-overload.cpp"
+ }
+ },
+ "end": "(\\))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.parameters.end.bracket.round.operator-overload.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#probably_a_parameter"
+ },
+ {
+ "include": "#function_context_c"
+ }
+ ]
+ },
+ "member_access": {
+ "match": "(?:((?\\*|->)))((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!auto[^(?-mix:\\w)]|void[^(?-mix:\\w)]|char[^(?-mix:\\w)]|short[^(?-mix:\\w)]|int[^(?-mix:\\w)]|signed[^(?-mix:\\w)]|unsigned[^(?-mix:\\w)]|long[^(?-mix:\\w)]|float[^(?-mix:\\w)]|double[^(?-mix:\\w)]|bool[^(?-mix:\\w)]|wchar_t[^(?-mix:\\w)]|u_char[^(?-mix:\\w)]|u_short[^(?-mix:\\w)]|u_int[^(?-mix:\\w)]|u_long[^(?-mix:\\w)]|ushort[^(?-mix:\\w)]|uint[^(?-mix:\\w)]|u_quad_t[^(?-mix:\\w)]|quad_t[^(?-mix:\\w)]|qaddr_t[^(?-mix:\\w)]|caddr_t[^(?-mix:\\w)]|daddr_t[^(?-mix:\\w)]|div_t[^(?-mix:\\w)]|dev_t[^(?-mix:\\w)]|fixpt_t[^(?-mix:\\w)]|blkcnt_t[^(?-mix:\\w)]|blksize_t[^(?-mix:\\w)]|gid_t[^(?-mix:\\w)]|in_addr_t[^(?-mix:\\w)]|in_port_t[^(?-mix:\\w)]|ino_t[^(?-mix:\\w)]|key_t[^(?-mix:\\w)]|mode_t[^(?-mix:\\w)]|nlink_t[^(?-mix:\\w)]|id_t[^(?-mix:\\w)]|pid_t[^(?-mix:\\w)]|off_t[^(?-mix:\\w)]|segsz_t[^(?-mix:\\w)]|swblk_t[^(?-mix:\\w)]|uid_t[^(?-mix:\\w)]|id_t[^(?-mix:\\w)]|clock_t[^(?-mix:\\w)]|size_t[^(?-mix:\\w)]|ssize_t[^(?-mix:\\w)]|time_t[^(?-mix:\\w)]|useconds_t[^(?-mix:\\w)]|suseconds_t[^(?-mix:\\w)]|int8_t[^(?-mix:\\w)]|int16_t[^(?-mix:\\w)]|int32_t[^(?-mix:\\w)]|int64_t[^(?-mix:\\w)]|uint8_t[^(?-mix:\\w)]|uint16_t[^(?-mix:\\w)]|uint32_t[^(?-mix:\\w)]|uint64_t[^(?-mix:\\w)]|int_least8_t[^(?-mix:\\w)]|int_least16_t[^(?-mix:\\w)]|int_least32_t[^(?-mix:\\w)]|int_least64_t[^(?-mix:\\w)]|uint_least8_t[^(?-mix:\\w)]|uint_least16_t[^(?-mix:\\w)]|uint_least32_t[^(?-mix:\\w)]|uint_least64_t[^(?-mix:\\w)]|int_fast8_t[^(?-mix:\\w)]|int_fast16_t[^(?-mix:\\w)]|int_fast32_t[^(?-mix:\\w)]|int_fast64_t[^(?-mix:\\w)]|uint_fast8_t[^(?-mix:\\w)]|uint_fast16_t[^(?-mix:\\w)]|uint_fast32_t[^(?-mix:\\w)]|uint_fast64_t[^(?-mix:\\w)]|intptr_t[^(?-mix:\\w)]|uintptr_t[^(?-mix:\\w)]|intmax_t[^(?-mix:\\w)]|intmax_t[^(?-mix:\\w)]|uintmax_t[^(?-mix:\\w)]|uintmax_t[^(?-mix:\\w)])(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*\\b(?!\\())",
+ "captures": {
+ "1": {
+ "name": "variable.language.this.cpp"
+ },
+ "2": {
+ "name": "variable.other.object.access.cpp"
+ },
+ "3": {
+ "name": "punctuation.separator.dot-access.cpp"
+ },
+ "4": {
+ "name": "punctuation.separator.pointer-access.cpp"
+ },
+ "5": {
+ "patterns": [
+ {
+ "match": "(?<=(?:\\.\\*|\\.|->|->\\*))\\s*(?-mix:(?:(?:(?\\*|->))))",
+ "name": "variable.other.object.property.cpp"
+ },
+ {
+ "match": "(?:((?\\*|->)))",
+ "captures": {
+ "1": {
+ "name": "variable.language.this.cpp"
+ },
+ "2": {
+ "name": "variable.other.object.access.cpp"
+ },
+ "3": {
+ "name": "punctuation.separator.dot-access.cpp"
+ },
+ "4": {
+ "name": "punctuation.separator.pointer-access.cpp"
+ }
+ }
+ },
+ {
+ "include": "#member_access"
+ },
+ {
+ "include": "#method_access"
+ }
+ ]
+ },
+ "6": {
+ "name": "variable.other.property.cpp"
+ }
+ }
+ },
+ "method_access": {
+ "contentName": "meta.function-call.member",
+ "begin": "(?:((?\\*|->)))((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "variable.language.this.cpp"
+ },
+ "2": {
+ "name": "variable.other.object.access.cpp"
+ },
+ "3": {
+ "name": "punctuation.separator.dot-access.cpp"
+ },
+ "4": {
+ "name": "punctuation.separator.pointer-access.cpp"
+ },
+ "5": {
+ "patterns": [
+ {
+ "match": "(?<=(?:\\.\\*|\\.|->|->\\*))\\s*(?-mix:(?:(?:(?\\*|->))))",
+ "name": "variable.other.object.property.cpp"
+ },
+ {
+ "match": "(?:((?\\*|->)))",
+ "captures": {
+ "1": {
+ "name": "variable.language.this.cpp"
+ },
+ "2": {
+ "name": "variable.other.object.access.cpp"
+ },
+ "3": {
+ "name": "punctuation.separator.dot-access.cpp"
+ },
+ "4": {
+ "name": "punctuation.separator.pointer-access.cpp"
+ }
+ }
+ },
+ {
+ "include": "#member_access"
+ },
+ {
+ "include": "#method_access"
+ }
+ ]
+ },
+ "6": {
+ "name": "entity.name.function.member.cpp"
+ },
+ "7": {
+ "name": "punctuation.section.arguments.begin.bracket.round.function.member.cpp"
+ }
+ },
+ "end": "(\\))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.arguments.end.bracket.round.function.member.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function_call_context_c"
+ }
+ ]
+ },
+ "using_namespace": {
+ "name": "meta.using-namespace.cpp",
+ "begin": "(?:,\\w])*>\\s*)))?::)*\\s*))?((?:,\\w])*>\\s*)))?::)*\\s*)\\s*(?:(?:((?\\[\\]=]))",
+ "patterns": [
+ {
+ "name": "meta.head.namespace.cpp",
+ "begin": "\\G ?",
+ "end": "((?:\\{|(?=;)))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.begin.bracket.curly.namespace.cpp"
+ }
+ }
+ },
+ {
+ "name": "meta.body.namespace.cpp",
+ "begin": "(?<=\\{)",
+ "end": "(\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.end.bracket.curly.namespace.cpp"
}
},
- "name": "meta.function.constructor.cpp",
"patterns": [
{
"include": "$base"
}
]
},
+ {
+ "name": "meta.tail.namespace.cpp",
+ "begin": "(?<=})[\\s\\n]*",
+ "end": "[\\s\\n]*(?=;)",
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ }
+ ]
+ },
+ "macro_argument": {
+ "match": "##(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*(?!\\w)",
+ "name": "variable.other.macro.argument.cpp"
+ },
+ "lambdas": {
+ "begin": "((?:(?<=[^\\s]|^)(?)(.+?(?=\\{|$))?",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.lambda.return-type.cpp"
+ },
+ "2": {
+ "name": "storage.type.return-type.lambda.cpp"
+ }
+ }
+ },
+ {
+ "name": "meta.function.definition.body.lambda.cpp",
+ "begin": "(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.section.block.begin.bracket.curly.lambda.cpp"
+ }
+ },
+ "end": "(\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.end.bracket.curly.lambda.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ }
+ ]
+ },
+ "pthread_types": {
+ "match": "(?:,\\w])*>\\s*)))?::)*\\s*)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(?:((?:,\\w])*>\\s*))?(::)))?\\s*((?\\[\\]=]))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.terminator.statement.cpp"
+ },
+ "2": {
+ "name": "punctuation.terminator.statement.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "name": "meta.head.enum.cpp",
+ "begin": "\\G ?",
+ "end": "((?:\\{|(?=;)))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.begin.bracket.curly.enum.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "name": "meta.body.enum.cpp",
+ "begin": "(?<=\\{)",
+ "end": "(\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.end.bracket.curly.enum.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#enumerator_list"
+ },
+ {
+ "include": "#comments_context"
+ },
+ {
+ "include": "#comma"
+ },
+ {
+ "include": "#semicolon"
+ }
+ ]
+ },
+ {
+ "name": "meta.tail.enum.cpp",
+ "begin": "(?<=})[\\s\\n]*",
+ "end": "[\\s\\n]*(?=;)",
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ }
+ ]
+ },
+ "inhertance_context": {
+ "patterns": [
+ {
+ "match": ",",
+ "name": "comma.cpp punctuation.separator.delimiter.inhertance.cpp"
+ },
+ {
+ "match": "(?:,\\w])*>\\s*)))?::)*\\s*)(?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(?:(?:(?:,\\w])*>\\s*))?(?:::)))?\\s*(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*(?:(?-mix:(?:(?:,\\w])*>\\s*)))?(?![\\w<:.]))))",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.inherited.cpp"
+ }
+ }
+ }
+ ]
+ },
+ "class_block": {
+ "name": "meta.block.class.cpp",
+ "begin": "((((?:,\\w])*>\\s*)))?::)*\\s*)(?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(?:(?:(?:,\\w])*>\\s*))?(?:::)))?\\s*(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*(?:(?-mix:(?:(?:,\\w])*>\\s*)))?(?![\\w<:.]))))+)*))?))",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.head.class.cpp"
+ },
+ "3": {
+ "name": "storage.type.$3.cpp"
+ },
+ "4": {
+ "patterns": [
+ {
+ "include": "#attributes"
+ }
+ ]
+ },
+ "5": {
+ "patterns": [
+ {
+ "include": "#attributes"
+ }
+ ]
+ },
+ "6": {
+ "name": "entity.name.type.$3.cpp"
+ },
+ "7": {
+ "name": "storage.type.modifier.final.cpp"
+ },
+ "8": {
+ "name": "colon.cpp punctuation.separator.inhertance.cpp"
+ },
+ "9": {
+ "patterns": [
+ {
+ "include": "#inhertance_context"
+ }
+ ]
+ }
+ },
+ "end": "(?:(?:(?<=})\\s*(;)|(;))|(?=[;>\\[\\]=]))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.terminator.statement.cpp"
+ },
+ "2": {
+ "name": "punctuation.terminator.statement.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "name": "meta.head.class.cpp",
+ "begin": "\\G ?",
+ "end": "((?:\\{|(?=;)))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.begin.bracket.curly.class.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#preprocessor_context"
+ },
+ {
+ "include": "#inhertance_context"
+ },
+ {
+ "include": "#template_call_range"
+ },
+ {
+ "include": "#comments_context"
+ }
+ ]
+ },
+ {
+ "name": "meta.body.class.cpp",
+ "begin": "(?<=\\{)",
+ "end": "(\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.end.bracket.curly.class.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function_pointer"
+ },
+ {
+ "include": "#constructor_context"
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "name": "meta.tail.class.cpp",
+ "begin": "(?<=})[\\s\\n]*",
+ "end": "[\\s\\n]*(?=;)",
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ }
+ ]
+ },
+ "struct_block": {
+ "name": "meta.block.struct.cpp",
+ "begin": "((((?:,\\w])*>\\s*)))?::)*\\s*)(?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(?:(?:(?:,\\w])*>\\s*))?(?:::)))?\\s*(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*(?:(?-mix:(?:(?:,\\w])*>\\s*)))?(?![\\w<:.]))))+)*))?))",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.head.struct.cpp"
+ },
+ "3": {
+ "name": "storage.type.$3.cpp"
+ },
+ "4": {
+ "patterns": [
+ {
+ "include": "#attributes"
+ }
+ ]
+ },
+ "5": {
+ "patterns": [
+ {
+ "include": "#attributes"
+ }
+ ]
+ },
+ "6": {
+ "name": "entity.name.type.$3.cpp"
+ },
+ "7": {
+ "name": "storage.type.modifier.final.cpp"
+ },
+ "8": {
+ "name": "colon.cpp punctuation.separator.inhertance.cpp"
+ },
+ "9": {
+ "patterns": [
+ {
+ "include": "#inhertance_context"
+ }
+ ]
+ }
+ },
+ "end": "(?:(?:(?<=})\\s*(;)|(;))|(?=[;>\\[\\]=]))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.terminator.statement.cpp"
+ },
+ "2": {
+ "name": "punctuation.terminator.statement.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "name": "meta.head.struct.cpp",
+ "begin": "\\G ?",
+ "end": "((?:\\{|(?=;)))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.begin.bracket.curly.struct.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#preprocessor_context"
+ },
+ {
+ "include": "#inhertance_context"
+ },
+ {
+ "include": "#template_call_range"
+ },
+ {
+ "include": "#comments_context"
+ }
+ ]
+ },
+ {
+ "name": "meta.body.struct.cpp",
+ "begin": "(?<=\\{)",
+ "end": "(\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.end.bracket.curly.struct.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function_pointer"
+ },
+ {
+ "include": "#constructor_context"
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "name": "meta.tail.struct.cpp",
+ "begin": "(?<=})[\\s\\n]*",
+ "end": "[\\s\\n]*(?=;)",
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ }
+ ]
+ },
+ "union_block": {
+ "name": "meta.block.union.cpp",
+ "begin": "((((?:,\\w])*>\\s*)))?::)*\\s*)(?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*)\\s*(?:(?:(?:,\\w])*>\\s*))?(?:::)))?\\s*(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F]))(?:(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U000[0-9a-fA-F])))*(?:(?-mix:(?:(?:,\\w])*>\\s*)))?(?![\\w<:.]))))+)*))?))",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.head.union.cpp"
+ },
+ "3": {
+ "name": "storage.type.$3.cpp"
+ },
+ "4": {
+ "patterns": [
+ {
+ "include": "#attributes"
+ }
+ ]
+ },
+ "5": {
+ "patterns": [
+ {
+ "include": "#attributes"
+ }
+ ]
+ },
+ "6": {
+ "name": "entity.name.type.$3.cpp"
+ },
+ "7": {
+ "name": "storage.type.modifier.final.cpp"
+ },
+ "8": {
+ "name": "colon.cpp punctuation.separator.inhertance.cpp"
+ },
+ "9": {
+ "patterns": [
+ {
+ "include": "#inhertance_context"
+ }
+ ]
+ }
+ },
+ "end": "(?:(?:(?<=})\\s*(;)|(;))|(?=[;>\\[\\]=]))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.terminator.statement.cpp"
+ },
+ "2": {
+ "name": "punctuation.terminator.statement.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "name": "meta.head.union.cpp",
+ "begin": "\\G ?",
+ "end": "((?:\\{|(?=;)))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.begin.bracket.curly.union.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#preprocessor_context"
+ },
+ {
+ "include": "#inhertance_context"
+ },
+ {
+ "include": "#template_call_range"
+ },
+ {
+ "include": "#comments_context"
+ }
+ ]
+ },
+ {
+ "name": "meta.body.union.cpp",
+ "begin": "(?<=\\{)",
+ "end": "(\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.end.bracket.curly.union.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function_pointer"
+ },
+ {
+ "include": "#constructor_context"
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "name": "meta.tail.union.cpp",
+ "begin": "(?<=})[\\s\\n]*",
+ "end": "[\\s\\n]*(?=;)",
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ }
+ ]
+ },
+ "extern_block": {
+ "name": "meta.block.extern.cpp",
+ "begin": "((\\bextern)(?=\\s*\\\"))",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.head.extern.cpp"
+ },
+ "2": {
+ "name": "storage.type.extern.cpp"
+ }
+ },
+ "end": "(?:(?:(?<=})\\s*(;)|(;))|(?=[;>\\[\\]=]))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.terminator.statement.cpp"
+ },
+ "2": {
+ "name": "punctuation.terminator.statement.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "name": "meta.head.extern.cpp",
+ "begin": "\\G ?",
+ "end": "((?:\\{|(?=;)))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.begin.bracket.curly.extern.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "name": "meta.body.extern.cpp",
+ "begin": "(?<=\\{)",
+ "end": "(\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.block.end.bracket.curly.extern.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "name": "meta.tail.extern.cpp",
+ "begin": "(?<=})[\\s\\n]*",
+ "end": "[\\s\\n]*(?=;)",
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ "hacky_fix_for_stray_directive": {
+ "match": "(?(?-mix:[a-zA-Z_$][\\w$]*)))\t # macro name\n(?:\n (\\()\n\t(\n\t \\s* \\g \\s*\t\t # first argument\n\t ((,) \\s* \\g \\s*)* # additional arguments\n\t (?:\\.\\.\\.)?\t\t\t# varargs ellipsis?\n\t)\n (\\))\n)?",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.directive.define.cpp"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.cpp"
+ },
+ "3": {
+ "name": "entity.name.function.preprocessor.cpp"
+ },
+ "5": {
+ "name": "punctuation.definition.parameters.begin.cpp"
+ },
+ "6": {
+ "name": "variable.parameter.preprocessor.cpp"
+ },
+ "8": {
+ "name": "punctuation.separator.parameters.cpp"
+ },
+ "9": {
+ "name": "punctuation.definition.parameters.end.cpp"
+ }
+ },
+ "end": "(?=(?://|/\\*))|(?",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.end.cpp"
+ }
+ },
+ "name": "string.quoted.other.lt-gt.include.cpp"
+ }
+ ]
+ },
+ "meta_preprocessor_line": {
+ "name": "meta.preprocessor.cpp",
+ "begin": "^\\s*((#)\\s*line)\\b",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.directive.line.cpp"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.cpp"
+ }
+ },
+ "end": "(?=(?://|/\\*))|(?|\\[|\\]|=))",
- "name": "meta.namespace-block.cpp",
- "patterns": [
- {
- "begin": "\\{",
- "beginCaptures": {
- "0": {
- "name": "punctuation.definition.scope.cpp"
- }
- },
- "end": "\\}",
- "endCaptures": {
- "0": {
- "name": "punctuation.definition.scope.cpp"
- }
- },
- "patterns": [
- {
- "include": "#special_block"
- },
- {
- "include": "#constructor"
- },
- {
- "include": "$base"
- }
- ]
- },
- {
- "include": "$base"
- }
- ]
+ "include": "#using_namespace"
},
{
- "begin": "\\b(class|struct)\\b\\s*([_A-Za-z][_A-Za-z0-9]*\\b)?+(\\s*:\\s*(public|protected|private)\\s*([_A-Za-z][_A-Za-z0-9]*\\b)((\\s*,\\s*(public|protected|private)\\s*[_A-Za-z][_A-Za-z0-9]*\\b)*))?",
- "beginCaptures": {
- "1": {
- "name": "storage.type.cpp"
- },
- "2": {
- "name": "entity.name.type.cpp"
- },
- "4": {
- "name": "storage.type.modifier.cpp"
- },
- "5": {
- "name": "entity.name.type.inherited.cpp"
- },
- "6": {
- "patterns": [
- {
- "match": "(public|protected|private)",
- "name": "storage.type.modifier.cpp"
- },
- {
- "match": "[_A-Za-z][_A-Za-z0-9]*",
- "name": "entity.name.type.inherited.cpp"
- }
- ]
- }
- },
- "end": "(?<=\\})|(?=(;|\\(|\\)|>|\\[|\\]|=))",
- "name": "meta.class-struct-block.cpp",
- "patterns": [
- {
- "include": "#angle_brackets"
- },
- {
- "begin": "\\{",
- "beginCaptures": {
- "0": {
- "name": "punctuation.section.block.begin.bracket.curly.cpp"
- }
- },
- "end": "(\\})(\\s*\\n)?",
- "endCaptures": {
- "1": {
- "name": "punctuation.section.block.end.bracket.curly.cpp"
- },
- "2": {
- "name": "invalid.illegal.you-forgot-semicolon.cpp"
- }
- },
- "patterns": [
- {
- "include": "#special_block"
- },
- {
- "include": "#constructor"
- },
- {
- "include": "$base"
- }
- ]
- },
- {
- "include": "$base"
- }
- ]
+ "include": "#type_alias"
},
{
- "begin": "\\b(extern)(?=\\s*\")",
- "beginCaptures": {
- "1": {
- "name": "storage.modifier.cpp"
- }
- },
- "end": "(?<=\\})|(?=\\w)|(?=\\s*#\\s*endif\\b)",
- "name": "meta.extern-block.cpp",
- "patterns": [
- {
- "begin": "\\{",
- "beginCaptures": {
- "0": {
- "name": "punctuation.section.block.begin.bracket.curly.c"
- }
- },
- "end": "\\}|(?=\\s*#\\s*endif\\b)",
- "endCaptures": {
- "0": {
- "name": "punctuation.section.block.end.bracket.curly.c"
- }
- },
- "patterns": [
- {
- "include": "#special_block"
- },
- {
- "include": "$base"
- }
- ]
- },
- {
- "include": "$base"
- }
- ]
+ "include": "#namespace_block"
+ },
+ {
+ "include": "#class_block"
+ },
+ {
+ "include": "#struct_block"
+ },
+ {
+ "include": "#union_block"
+ },
+ {
+ "include": "#enum_block"
+ },
+ {
+ "include": "#extern_block"
}
]
},
- "strings": {
+ "string_context": {
"patterns": [
{
"begin": "(u|u8|U|L)?\"",
@@ -413,7 +2997,7 @@
"name": "constant.character.escape.cpp"
},
{
- "include": "source.c#string_placeholder"
+ "include": "#string_escapes_context_c"
}
]
},
@@ -442,6 +3026,1490 @@
"name": "string.quoted.double.raw.cpp"
}
]
+ },
+ "block": {
+ "begin": "{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.block.begin.bracket.curly.cpp"
+ }
+ },
+ "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.block.end.bracket.curly.cpp"
+ }
+ },
+ "name": "meta.block.cpp",
+ "patterns": [
+ {
+ "include": "#block_context"
+ }
+ ]
+ },
+ "block_context": {
+ "patterns": [
+ {
+ "include": "#preprocessor_rule_enabled_block"
+ },
+ {
+ "include": "#preprocessor_rule_disabled_block"
+ },
+ {
+ "include": "#preprocessor_rule_conditional_block"
+ },
+ {
+ "include": "#method_access"
+ },
+ {
+ "include": "#member_access"
+ },
+ {
+ "include": "#function_call_c"
+ },
+ {
+ "name": "meta.initialization.cpp",
+ "begin": "(?x)\n(?:\n (?:\n\t(?=\\s)(?=+!]+ | \\(\\) | \\[\\]))\n)\n\\s*(\\() # opening bracket",
+ "beginCaptures": {
+ "1": {
+ "name": "variable.other.cpp"
+ },
+ "2": {
+ "name": "punctuation.section.parens.begin.bracket.round.initialization.cpp"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.end.bracket.round.initialization.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function_call_context_c"
+ }
+ ]
+ },
+ {
+ "begin": "{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.block.begin.bracket.curly.cpp"
+ }
+ },
+ "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.block.end.bracket.curly.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#block_context"
+ }
+ ]
+ },
+ {
+ "include": "#parentheses_block"
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ "function_call_c": {
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|return|typeid|alignof|alignas|sizeof|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|constexpr|volatile|operator|(?:::)?new|(?:::)?delete)\\s*\\()\n(?=\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*(?-mix:(?:(?-mix:(?:(?:,\\w])*>\\s*)))?)\\( # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)",
+ "end": "(?<=\\))(?!\\w)",
+ "name": "meta.function-call.cpp",
+ "patterns": [
+ {
+ "include": "#function_call_context_c"
+ }
+ ]
+ },
+ "comments_context": {
+ "patterns": [
+ {
+ "captures": {
+ "1": {
+ "name": "meta.toc-list.banner.block.cpp"
+ }
+ },
+ "match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?",
+ "name": "comment.block.cpp"
+ },
+ {
+ "begin": "/\\*",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.begin.cpp"
+ }
+ },
+ "end": "\\*/",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.end.cpp"
+ }
+ },
+ "name": "comment.block.cpp"
+ },
+ {
+ "captures": {
+ "1": {
+ "name": "meta.toc-list.banner.line.cpp"
+ }
+ },
+ "match": "^// =(\\s*.*?)\\s*=\\s*$\\n?",
+ "name": "comment.line.banner.cpp"
+ },
+ {
+ "begin": "(^[ \\t]+)?(?=//)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.whitespace.comment.leading.cpp"
+ }
+ },
+ "end": "(?!\\G)",
+ "patterns": [
+ {
+ "begin": "//",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.cpp"
+ }
+ },
+ "end": "(?=\\n)",
+ "name": "comment.line.double-slash.cpp",
+ "patterns": [
+ {
+ "include": "#line_continuation_character"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "disabled": {
+ "begin": "^\\s*#\\s*if(n?def)?\\b.*$",
+ "end": "^\\s*#\\s*endif\\b",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma_mark"
+ }
+ ]
+ },
+ "line_continuation_character": {
+ "match": "(\\\\)\\n",
+ "captures": {
+ "1": {
+ "name": "constant.character.escape.line-continuation.cpp"
+ }
+ }
+ },
+ "parentheses": {
+ "name": "meta.parens.cpp",
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.begin.bracket.round.cpp"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.end.bracket.round.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ "parentheses_block": {
+ "name": "meta.parens.block.cpp",
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.begin.bracket.round.cpp"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.end.bracket.round.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#block_context"
+ },
+ {
+ "match": "(?-mix:(?=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)",
+ "end": "(?<=\\))(?!\\w)|(?=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "entity.name.function.cpp"
+ },
+ "2": {
+ "name": "punctuation.section.arguments.begin.bracket.round.cpp"
+ }
+ },
+ "end": "(\\))|(?:,\\w])*>\\s*)))?)) # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.wordlike.cpp memory.cpp keyword.operator.new.cpp"
+ },
+ "2": {
+ "patterns": [
+ {
+ "include": "#template_call_innards"
+ }
+ ]
+ },
+ "3": {
+ "name": "punctuation.section.arguments.begin.bracket.round.cpp"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.arguments.end.bracket.round.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function_call_context_c"
+ }
+ ]
+ },
+ {
+ "include": "#function_call"
+ },
+ {
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.begin.bracket.round.cpp"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.end.bracket.round.cpp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function_call_context_c"
+ }
+ ]
+ },
+ {
+ "include": "#block_context"
+ }
+ ]
}
}
}
\ No newline at end of file
diff --git a/extensions/cpp/test/colorize-results/test-23630_cpp.json b/extensions/cpp/test/colorize-results/test-23630_cpp.json
index f22786a105f..a58961ae945 100644
--- a/extensions/cpp/test/colorize-results/test-23630_cpp.json
+++ b/extensions/cpp/test/colorize-results/test-23630_cpp.json
@@ -1,7 +1,7 @@
[
{
"c": "#",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c punctuation.definition.directive.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp punctuation.definition.directive.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -12,7 +12,7 @@
},
{
"c": "ifndef",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -23,7 +23,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.preprocessor.c",
+ "t": "source.cpp meta.preprocessor.cpp",
"r": {
"dark_plus": "meta.preprocessor: #569CD6",
"light_plus": "meta.preprocessor: #0000FF",
@@ -34,7 +34,7 @@
},
{
"c": "_UCRT",
- "t": "source.cpp meta.preprocessor.c entity.name.function.preprocessor.c",
+ "t": "source.cpp meta.preprocessor.cpp entity.name.function.preprocessor.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -45,7 +45,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.preprocessor.macro.c",
+ "t": "source.cpp meta.preprocessor.macro.cpp",
"r": {
"dark_plus": "meta.preprocessor: #569CD6",
"light_plus": "meta.preprocessor: #0000FF",
@@ -56,7 +56,7 @@
},
{
"c": "#",
- "t": "source.cpp meta.preprocessor.macro.c keyword.control.directive.define.c punctuation.definition.directive.c",
+ "t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp punctuation.definition.directive.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -67,7 +67,7 @@
},
{
"c": "define",
- "t": "source.cpp meta.preprocessor.macro.c keyword.control.directive.define.c",
+ "t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -78,7 +78,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.preprocessor.macro.c",
+ "t": "source.cpp meta.preprocessor.macro.cpp",
"r": {
"dark_plus": "meta.preprocessor: #569CD6",
"light_plus": "meta.preprocessor: #0000FF",
@@ -89,7 +89,7 @@
},
{
"c": "_UCRT",
- "t": "source.cpp meta.preprocessor.macro.c entity.name.function.preprocessor.c",
+ "t": "source.cpp meta.preprocessor.macro.cpp entity.name.function.preprocessor.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -100,7 +100,7 @@
},
{
"c": "#",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c punctuation.definition.directive.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp punctuation.definition.directive.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -111,7 +111,7 @@
},
{
"c": "endif",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
diff --git a/extensions/cpp/test/colorize-results/test-23850_cpp.json b/extensions/cpp/test/colorize-results/test-23850_cpp.json
index bbb5237498f..924bbc78243 100644
--- a/extensions/cpp/test/colorize-results/test-23850_cpp.json
+++ b/extensions/cpp/test/colorize-results/test-23850_cpp.json
@@ -1,7 +1,7 @@
[
{
"c": "#",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c punctuation.definition.directive.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp punctuation.definition.directive.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -12,7 +12,7 @@
},
{
"c": "ifndef",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -23,7 +23,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.preprocessor.c",
+ "t": "source.cpp meta.preprocessor.cpp",
"r": {
"dark_plus": "meta.preprocessor: #569CD6",
"light_plus": "meta.preprocessor: #0000FF",
@@ -34,7 +34,7 @@
},
{
"c": "_UCRT",
- "t": "source.cpp meta.preprocessor.c entity.name.function.preprocessor.c",
+ "t": "source.cpp meta.preprocessor.cpp entity.name.function.preprocessor.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -45,7 +45,7 @@
},
{
"c": "#",
- "t": "source.cpp meta.preprocessor.macro.c keyword.control.directive.define.c punctuation.definition.directive.c",
+ "t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp punctuation.definition.directive.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -56,7 +56,7 @@
},
{
"c": "define",
- "t": "source.cpp meta.preprocessor.macro.c keyword.control.directive.define.c",
+ "t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -67,7 +67,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.preprocessor.macro.c",
+ "t": "source.cpp meta.preprocessor.macro.cpp",
"r": {
"dark_plus": "meta.preprocessor: #569CD6",
"light_plus": "meta.preprocessor: #0000FF",
@@ -78,7 +78,7 @@
},
{
"c": "_UCRT",
- "t": "source.cpp meta.preprocessor.macro.c entity.name.function.preprocessor.c",
+ "t": "source.cpp meta.preprocessor.macro.cpp entity.name.function.preprocessor.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -89,7 +89,7 @@
},
{
"c": "#",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c punctuation.definition.directive.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp punctuation.definition.directive.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -100,7 +100,7 @@
},
{
"c": "endif",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
diff --git a/extensions/cpp/test/colorize-results/test_c.json b/extensions/cpp/test/colorize-results/test_c.json
index 0725010d8c2..74be734c5ca 100644
--- a/extensions/cpp/test/colorize-results/test_c.json
+++ b/extensions/cpp/test/colorize-results/test_c.json
@@ -243,7 +243,7 @@
},
{
"c": "int",
- "t": "source.c storage.type.c",
+ "t": "source.c storage.type.built-in.primitive.c",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -265,7 +265,7 @@
},
{
"c": "main",
- "t": "source.c meta.function.c entity.name.function.c",
+ "t": "source.c meta.function.c meta.function.definition.parameters.c entity.name.function.c",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -276,7 +276,7 @@
},
{
"c": "(",
- "t": "source.c meta.function.c punctuation.section.parameters.begin.bracket.round.c",
+ "t": "source.c meta.function.c meta.function.definition.parameters.c punctuation.section.parameters.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -287,7 +287,7 @@
},
{
"c": ")",
- "t": "source.c meta.function.c punctuation.section.parameters.end.bracket.round.c",
+ "t": "source.c meta.function.c meta.function.definition.parameters.c punctuation.section.parameters.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -320,7 +320,7 @@
},
{
"c": "float",
- "t": "source.c meta.block.c storage.type.c",
+ "t": "source.c meta.block.c storage.type.built-in.primitive.c",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -507,7 +507,7 @@
},
{
"c": " ",
- "t": "source.c meta.block.c punctuation.whitespace.support.function.leading.c",
+ "t": "source.c meta.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -518,18 +518,18 @@
},
{
"c": "printf",
- "t": "source.c meta.block.c support.function.C99.c",
+ "t": "source.c meta.block.c meta.function-call.c entity.name.function.c",
"r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
+ "hc_black": "entity.name.function: #DCDCAA"
}
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -540,7 +540,7 @@
},
{
"c": "\"",
- "t": "source.c meta.block.c string.quoted.double.c punctuation.definition.string.begin.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c punctuation.definition.string.begin.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -551,7 +551,7 @@
},
{
"c": "Enter coefficients a, b and c: ",
- "t": "source.c meta.block.c string.quoted.double.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -562,7 +562,7 @@
},
{
"c": "\"",
- "t": "source.c meta.block.c string.quoted.double.c punctuation.definition.string.end.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c punctuation.definition.string.end.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -573,7 +573,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -595,7 +595,7 @@
},
{
"c": " ",
- "t": "source.c meta.block.c punctuation.whitespace.support.function.leading.c",
+ "t": "source.c meta.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -606,18 +606,18 @@
},
{
"c": "scanf",
- "t": "source.c meta.block.c support.function.C99.c",
+ "t": "source.c meta.block.c meta.function-call.c entity.name.function.c",
"r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
+ "hc_black": "entity.name.function: #DCDCAA"
}
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -628,7 +628,7 @@
},
{
"c": "\"",
- "t": "source.c meta.block.c string.quoted.double.c punctuation.definition.string.begin.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c punctuation.definition.string.begin.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -639,7 +639,7 @@
},
{
"c": "%f%f%f",
- "t": "source.c meta.block.c string.quoted.double.c constant.other.placeholder.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c constant.other.placeholder.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -650,7 +650,7 @@
},
{
"c": "\"",
- "t": "source.c meta.block.c string.quoted.double.c punctuation.definition.string.end.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c punctuation.definition.string.end.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -661,7 +661,7 @@
},
{
"c": ",",
- "t": "source.c meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -672,7 +672,7 @@
},
{
"c": "&",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.function-call.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -683,7 +683,7 @@
},
{
"c": "a",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -694,7 +694,7 @@
},
{
"c": ",",
- "t": "source.c meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -705,7 +705,7 @@
},
{
"c": "&",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.function-call.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -716,7 +716,7 @@
},
{
"c": "b",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -727,7 +727,7 @@
},
{
"c": ",",
- "t": "source.c meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -738,7 +738,7 @@
},
{
"c": "&",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.function-call.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -749,7 +749,7 @@
},
{
"c": "c",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -760,7 +760,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -848,7 +848,7 @@
},
{
"c": "4",
- "t": "source.c meta.block.c constant.numeric.c",
+ "t": "source.c meta.block.c constant.numeric.decimal.c",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
@@ -947,7 +947,7 @@
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -958,7 +958,7 @@
},
{
"c": "determinant",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.parens.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -969,7 +969,7 @@
},
{
"c": ">",
- "t": "source.c meta.block.c keyword.operator.comparison.c",
+ "t": "source.c meta.block.c meta.parens.block.c keyword.operator.comparison.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -980,7 +980,7 @@
},
{
"c": "0",
- "t": "source.c meta.block.c constant.numeric.c",
+ "t": "source.c meta.block.c meta.parens.block.c constant.numeric.decimal.c",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
@@ -991,7 +991,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1057,7 +1057,7 @@
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1068,7 +1068,7 @@
},
{
"c": "-",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.parens.block.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -1079,7 +1079,7 @@
},
{
"c": "b",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.parens.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1090,7 +1090,7 @@
},
{
"c": "+",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.parens.block.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -1101,18 +1101,18 @@
},
{
"c": "sqrt",
- "t": "source.c meta.block.c support.function.C99.c",
+ "t": "source.c meta.block.c meta.parens.block.c meta.function-call.c entity.name.function.c",
"r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
+ "hc_black": "entity.name.function: #DCDCAA"
}
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1123,7 +1123,7 @@
},
{
"c": "determinant",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.parens.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1133,8 +1133,19 @@
}
},
{
- "c": "))",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "c": ")",
+ "t": "source.c meta.block.c meta.parens.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": ")",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1156,7 +1167,7 @@
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1167,7 +1178,7 @@
},
{
"c": "2",
- "t": "source.c meta.block.c constant.numeric.c",
+ "t": "source.c meta.block.c meta.parens.block.c constant.numeric.decimal.c",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
@@ -1178,7 +1189,7 @@
},
{
"c": "*",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.parens.block.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -1189,7 +1200,7 @@
},
{
"c": "a",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.parens.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1200,7 +1211,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1255,7 +1266,7 @@
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1266,7 +1277,7 @@
},
{
"c": "-",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.parens.block.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -1277,7 +1288,7 @@
},
{
"c": "b",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.parens.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1288,7 +1299,7 @@
},
{
"c": "-",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.parens.block.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -1299,18 +1310,18 @@
},
{
"c": "sqrt",
- "t": "source.c meta.block.c support.function.C99.c",
+ "t": "source.c meta.block.c meta.parens.block.c meta.function-call.c entity.name.function.c",
"r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
+ "hc_black": "entity.name.function: #DCDCAA"
}
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1321,7 +1332,7 @@
},
{
"c": "determinant",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.parens.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1331,8 +1342,19 @@
}
},
{
- "c": "))",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "c": ")",
+ "t": "source.c meta.block.c meta.parens.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": ")",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1354,7 +1376,7 @@
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1365,7 +1387,7 @@
},
{
"c": "2",
- "t": "source.c meta.block.c constant.numeric.c",
+ "t": "source.c meta.block.c meta.parens.block.c constant.numeric.decimal.c",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
@@ -1376,7 +1398,7 @@
},
{
"c": "*",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.parens.block.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -1387,7 +1409,7 @@
},
{
"c": "a",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.parens.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1398,7 +1420,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1420,7 +1442,7 @@
},
{
"c": " ",
- "t": "source.c meta.block.c punctuation.whitespace.support.function.leading.c",
+ "t": "source.c meta.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1431,18 +1453,18 @@
},
{
"c": "printf",
- "t": "source.c meta.block.c support.function.C99.c",
+ "t": "source.c meta.block.c meta.function-call.c entity.name.function.c",
"r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
+ "hc_black": "entity.name.function: #DCDCAA"
}
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1453,7 +1475,7 @@
},
{
"c": "\"",
- "t": "source.c meta.block.c string.quoted.double.c punctuation.definition.string.begin.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c punctuation.definition.string.begin.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1464,7 +1486,7 @@
},
{
"c": "Roots are: ",
- "t": "source.c meta.block.c string.quoted.double.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1475,7 +1497,7 @@
},
{
"c": "%.2f",
- "t": "source.c meta.block.c string.quoted.double.c constant.other.placeholder.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c constant.other.placeholder.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1486,7 +1508,7 @@
},
{
"c": " and ",
- "t": "source.c meta.block.c string.quoted.double.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1497,7 +1519,7 @@
},
{
"c": "%.2f",
- "t": "source.c meta.block.c string.quoted.double.c constant.other.placeholder.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c constant.other.placeholder.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1508,7 +1530,7 @@
},
{
"c": "\"",
- "t": "source.c meta.block.c string.quoted.double.c punctuation.definition.string.end.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c punctuation.definition.string.end.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1519,7 +1541,7 @@
},
{
"c": ",",
- "t": "source.c meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1530,7 +1552,7 @@
},
{
"c": "r1 ",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1541,7 +1563,7 @@
},
{
"c": ",",
- "t": "source.c meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1552,7 +1574,7 @@
},
{
"c": " r2",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1563,7 +1585,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1662,7 +1684,7 @@
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1673,7 +1695,7 @@
},
{
"c": "determinant",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.parens.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1684,7 +1706,7 @@
},
{
"c": "==",
- "t": "source.c meta.block.c keyword.operator.comparison.c",
+ "t": "source.c meta.block.c meta.parens.block.c keyword.operator.comparison.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -1695,7 +1717,7 @@
},
{
"c": "0",
- "t": "source.c meta.block.c constant.numeric.c",
+ "t": "source.c meta.block.c meta.parens.block.c constant.numeric.decimal.c",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
@@ -1706,7 +1728,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1827,7 +1849,7 @@
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1838,7 +1860,7 @@
},
{
"c": "2",
- "t": "source.c meta.block.c constant.numeric.c",
+ "t": "source.c meta.block.c meta.parens.block.c constant.numeric.decimal.c",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
@@ -1849,7 +1871,7 @@
},
{
"c": "*",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.parens.block.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -1860,7 +1882,7 @@
},
{
"c": "a",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.parens.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1871,7 +1893,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1893,7 +1915,7 @@
},
{
"c": " ",
- "t": "source.c meta.block.c punctuation.whitespace.support.function.leading.c",
+ "t": "source.c meta.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1904,18 +1926,18 @@
},
{
"c": "printf",
- "t": "source.c meta.block.c support.function.C99.c",
+ "t": "source.c meta.block.c meta.function-call.c entity.name.function.c",
"r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
+ "hc_black": "entity.name.function: #DCDCAA"
}
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1926,7 +1948,7 @@
},
{
"c": "\"",
- "t": "source.c meta.block.c string.quoted.double.c punctuation.definition.string.begin.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c punctuation.definition.string.begin.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1937,7 +1959,7 @@
},
{
"c": "Roots are: ",
- "t": "source.c meta.block.c string.quoted.double.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1948,7 +1970,7 @@
},
{
"c": "%.2f",
- "t": "source.c meta.block.c string.quoted.double.c constant.other.placeholder.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c constant.other.placeholder.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1959,7 +1981,7 @@
},
{
"c": " and ",
- "t": "source.c meta.block.c string.quoted.double.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1970,7 +1992,7 @@
},
{
"c": "%.2f",
- "t": "source.c meta.block.c string.quoted.double.c constant.other.placeholder.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c constant.other.placeholder.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1981,7 +2003,7 @@
},
{
"c": "\"",
- "t": "source.c meta.block.c string.quoted.double.c punctuation.definition.string.end.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c punctuation.definition.string.end.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1992,7 +2014,7 @@
},
{
"c": ",",
- "t": "source.c meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2003,7 +2025,7 @@
},
{
"c": " r1",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2014,7 +2036,7 @@
},
{
"c": ",",
- "t": "source.c meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2025,7 +2047,7 @@
},
{
"c": " r2",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2036,7 +2058,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2190,7 +2212,7 @@
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2201,7 +2223,7 @@
},
{
"c": "2",
- "t": "source.c meta.block.c constant.numeric.c",
+ "t": "source.c meta.block.c meta.parens.block.c constant.numeric.decimal.c",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
@@ -2212,7 +2234,7 @@
},
{
"c": "*",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.parens.block.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -2223,7 +2245,7 @@
},
{
"c": "a",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.parens.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2234,7 +2256,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2278,50 +2300,6 @@
},
{
"c": " ",
- "t": "source.c meta.block.c punctuation.whitespace.support.function.leading.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "sqrt",
- "t": "source.c meta.block.c support.function.C99.c",
- "r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
- }
- },
- {
- "c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "-",
- "t": "source.c meta.block.c keyword.operator.c",
- "r": {
- "dark_plus": "keyword.operator: #D4D4D4",
- "light_plus": "keyword.operator: #000000",
- "dark_vs": "keyword.operator: #D4D4D4",
- "light_vs": "keyword.operator: #000000",
- "hc_black": "keyword.operator: #D4D4D4"
- }
- },
- {
- "c": "determinant",
"t": "source.c meta.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
@@ -2331,9 +2309,53 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "sqrt",
+ "t": "source.c meta.block.c meta.function-call.c entity.name.function.c",
+ "r": {
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.function: #DCDCAA"
+ }
+ },
+ {
+ "c": "(",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "-",
+ "t": "source.c meta.block.c meta.function-call.c keyword.operator.c",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
+ {
+ "c": "determinant",
+ "t": "source.c meta.block.c meta.function-call.c",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2355,7 +2377,7 @@
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2366,7 +2388,7 @@
},
{
"c": "2",
- "t": "source.c meta.block.c constant.numeric.c",
+ "t": "source.c meta.block.c meta.parens.block.c constant.numeric.decimal.c",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
@@ -2377,7 +2399,7 @@
},
{
"c": "*",
- "t": "source.c meta.block.c keyword.operator.c",
+ "t": "source.c meta.block.c meta.parens.block.c keyword.operator.c",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -2388,7 +2410,7 @@
},
{
"c": "a",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.parens.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2399,7 +2421,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.parens.block.c punctuation.section.parens.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2421,7 +2443,7 @@
},
{
"c": " ",
- "t": "source.c meta.block.c punctuation.whitespace.support.function.leading.c",
+ "t": "source.c meta.block.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2432,18 +2454,18 @@
},
{
"c": "printf",
- "t": "source.c meta.block.c support.function.C99.c",
+ "t": "source.c meta.block.c meta.function-call.c entity.name.function.c",
"r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
+ "hc_black": "entity.name.function: #DCDCAA"
}
},
{
"c": "(",
- "t": "source.c meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2454,7 +2476,7 @@
},
{
"c": "\"",
- "t": "source.c meta.block.c string.quoted.double.c punctuation.definition.string.begin.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c punctuation.definition.string.begin.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -2465,7 +2487,7 @@
},
{
"c": "Roots are: ",
- "t": "source.c meta.block.c string.quoted.double.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -2476,7 +2498,7 @@
},
{
"c": "%.2f",
- "t": "source.c meta.block.c string.quoted.double.c constant.other.placeholder.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c constant.other.placeholder.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -2487,7 +2509,7 @@
},
{
"c": "+",
- "t": "source.c meta.block.c string.quoted.double.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -2498,7 +2520,7 @@
},
{
"c": "%.2f",
- "t": "source.c meta.block.c string.quoted.double.c constant.other.placeholder.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c constant.other.placeholder.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -2509,7 +2531,7 @@
},
{
"c": "i and ",
- "t": "source.c meta.block.c string.quoted.double.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -2520,7 +2542,7 @@
},
{
"c": "%.2f",
- "t": "source.c meta.block.c string.quoted.double.c constant.other.placeholder.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c constant.other.placeholder.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -2531,7 +2553,7 @@
},
{
"c": "-",
- "t": "source.c meta.block.c string.quoted.double.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -2542,7 +2564,7 @@
},
{
"c": "%.2f",
- "t": "source.c meta.block.c string.quoted.double.c constant.other.placeholder.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c constant.other.placeholder.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -2553,7 +2575,7 @@
},
{
"c": "i",
- "t": "source.c meta.block.c string.quoted.double.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -2564,7 +2586,7 @@
},
{
"c": "\"",
- "t": "source.c meta.block.c string.quoted.double.c punctuation.definition.string.end.c",
+ "t": "source.c meta.block.c meta.function-call.c string.quoted.double.c punctuation.definition.string.end.c",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -2575,7 +2597,7 @@
},
{
"c": ",",
- "t": "source.c meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2586,7 +2608,7 @@
},
{
"c": " real",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2597,7 +2619,7 @@
},
{
"c": ",",
- "t": "source.c meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2608,7 +2630,7 @@
},
{
"c": " imag",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2619,7 +2641,7 @@
},
{
"c": ",",
- "t": "source.c meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2630,7 +2652,7 @@
},
{
"c": " real",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2641,7 +2663,7 @@
},
{
"c": ",",
- "t": "source.c meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2652,7 +2674,7 @@
},
{
"c": " imag",
- "t": "source.c meta.block.c",
+ "t": "source.c meta.block.c meta.function-call.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2663,7 +2685,7 @@
},
{
"c": ")",
- "t": "source.c meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.c meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -2740,7 +2762,7 @@
},
{
"c": "0",
- "t": "source.c meta.block.c constant.numeric.c",
+ "t": "source.c meta.block.c constant.numeric.decimal.c",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
diff --git a/extensions/cpp/test/colorize-results/test_cc.json b/extensions/cpp/test/colorize-results/test_cc.json
index f3f72320fb5..e53e3ede6e4 100644
--- a/extensions/cpp/test/colorize-results/test_cc.json
+++ b/extensions/cpp/test/colorize-results/test_cc.json
@@ -1,7 +1,7 @@
[
{
"c": "#",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c punctuation.definition.directive.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp punctuation.definition.directive.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -12,7 +12,7 @@
},
{
"c": "if",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -23,7 +23,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.preprocessor.c",
+ "t": "source.cpp meta.preprocessor.cpp",
"r": {
"dark_plus": "meta.preprocessor: #569CD6",
"light_plus": "meta.preprocessor: #0000FF",
@@ -34,7 +34,7 @@
},
{
"c": "B4G_DEBUG_CHECK",
- "t": "source.cpp meta.preprocessor.c entity.name.function.preprocessor.c",
+ "t": "source.cpp meta.preprocessor.cpp entity.name.function.preprocessor.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -56,7 +56,7 @@
},
{
"c": "fprintf",
- "t": "source.cpp meta.function.c entity.name.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp entity.name.function.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -67,7 +67,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.function.c punctuation.section.parameters.begin.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -78,7 +78,7 @@
},
{
"c": "stderr",
- "t": "source.cpp meta.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -89,7 +89,7 @@
},
{
"c": ",",
- "t": "source.cpp meta.function.c punctuation.separator.delimiter.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp comma.cpp punctuation.separator.delimiter.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -100,7 +100,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.function.c string.quoted.double.cpp punctuation.definition.string.begin.cpp",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp punctuation.definition.string.begin.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -111,7 +111,7 @@
},
{
"c": "num_candidate_ret=",
- "t": "source.cpp meta.function.c string.quoted.double.cpp",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -122,7 +122,7 @@
},
{
"c": "%d",
- "t": "source.cpp meta.function.c string.quoted.double.cpp constant.other.placeholder.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp constant.other.placeholder.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -133,7 +133,7 @@
},
{
"c": ":",
- "t": "source.cpp meta.function.c string.quoted.double.cpp",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -144,7 +144,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.function.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp punctuation.definition.string.end.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -155,7 +155,7 @@
},
{
"c": ",",
- "t": "source.cpp meta.function.c punctuation.separator.delimiter.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp comma.cpp punctuation.separator.delimiter.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -166,7 +166,7 @@
},
{
"c": " num_candidate",
- "t": "source.cpp meta.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -177,7 +177,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.function.c punctuation.section.parameters.end.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -188,7 +188,7 @@
},
{
"c": ";",
- "t": "source.cpp punctuation.terminator.statement.c",
+ "t": "source.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -210,7 +210,7 @@
},
{
"c": "for",
- "t": "source.cpp keyword.control.c",
+ "t": "source.cpp keyword.control.for.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -221,7 +221,7 @@
},
{
"c": "(",
- "t": "source.cpp punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.cpp meta.parens.cpp punctuation.section.parens.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -232,7 +232,7 @@
},
{
"c": "int",
- "t": "source.cpp storage.type.c",
+ "t": "source.cpp meta.parens.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -243,7 +243,7 @@
},
{
"c": " i",
- "t": "source.cpp",
+ "t": "source.cpp meta.parens.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -254,7 +254,7 @@
},
{
"c": "=",
- "t": "source.cpp keyword.operator.assignment.c",
+ "t": "source.cpp meta.parens.cpp keyword.operator.assignment.cpp",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -265,7 +265,7 @@
},
{
"c": "0",
- "t": "source.cpp constant.numeric.c",
+ "t": "source.cpp meta.parens.cpp constant.numeric.decimal.cpp",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
@@ -276,7 +276,7 @@
},
{
"c": ";",
- "t": "source.cpp punctuation.terminator.statement.c",
+ "t": "source.cpp meta.parens.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -287,7 +287,7 @@
},
{
"c": "i",
- "t": "source.cpp",
+ "t": "source.cpp meta.parens.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -298,7 +298,7 @@
},
{
"c": "<",
- "t": "source.cpp keyword.operator.comparison.c",
+ "t": "source.cpp meta.parens.cpp keyword.operator.comparison.cpp",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -309,7 +309,7 @@
},
{
"c": "num_candidate",
- "t": "source.cpp",
+ "t": "source.cpp meta.parens.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -320,7 +320,7 @@
},
{
"c": ";",
- "t": "source.cpp punctuation.terminator.statement.c",
+ "t": "source.cpp meta.parens.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -331,7 +331,7 @@
},
{
"c": "++",
- "t": "source.cpp keyword.operator.increment.c",
+ "t": "source.cpp meta.parens.cpp keyword.operator.increment.cpp",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -342,7 +342,7 @@
},
{
"c": "i",
- "t": "source.cpp",
+ "t": "source.cpp meta.parens.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -353,7 +353,7 @@
},
{
"c": ")",
- "t": "source.cpp punctuation.section.parens.end.bracket.round.c",
+ "t": "source.cpp meta.parens.cpp punctuation.section.parens.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -375,7 +375,7 @@
},
{
"c": "fprintf",
- "t": "source.cpp meta.function.c entity.name.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp entity.name.function.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -386,7 +386,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.function.c punctuation.section.parameters.begin.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -397,7 +397,7 @@
},
{
"c": "stderr",
- "t": "source.cpp meta.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -408,7 +408,7 @@
},
{
"c": ",",
- "t": "source.cpp meta.function.c punctuation.separator.delimiter.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp comma.cpp punctuation.separator.delimiter.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -419,7 +419,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.function.c string.quoted.double.cpp punctuation.definition.string.begin.cpp",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp punctuation.definition.string.begin.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -430,7 +430,7 @@
},
{
"c": "%d",
- "t": "source.cpp meta.function.c string.quoted.double.cpp constant.other.placeholder.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp constant.other.placeholder.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -441,7 +441,7 @@
},
{
"c": ",",
- "t": "source.cpp meta.function.c string.quoted.double.cpp",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -452,7 +452,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.function.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp punctuation.definition.string.end.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -463,7 +463,7 @@
},
{
"c": ",",
- "t": "source.cpp meta.function.c punctuation.separator.delimiter.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp comma.cpp punctuation.separator.delimiter.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -474,18 +474,18 @@
},
{
"c": "user_candidate",
- "t": "source.cpp meta.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp meta.bracket.square.access.cpp variable.other.object.cpp",
"r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
+ "hc_black": "variable: #9CDCFE"
}
},
{
"c": "[",
- "t": "source.cpp meta.function.c punctuation.definition.begin.bracket.square.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp meta.bracket.square.access.cpp punctuation.definition.begin.bracket.square.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -496,7 +496,7 @@
},
{
"c": "i",
- "t": "source.cpp meta.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp meta.bracket.square.access.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -507,7 +507,7 @@
},
{
"c": "]",
- "t": "source.cpp meta.function.c punctuation.definition.end.bracket.square.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp meta.bracket.square.access.cpp punctuation.definition.end.bracket.square.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -518,7 +518,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.function.c punctuation.section.parameters.end.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -529,7 +529,7 @@
},
{
"c": ";",
- "t": "source.cpp punctuation.terminator.statement.c",
+ "t": "source.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -551,7 +551,7 @@
},
{
"c": "fprintf",
- "t": "source.cpp meta.function.c entity.name.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp entity.name.function.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -562,7 +562,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.function.c punctuation.section.parameters.begin.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -573,7 +573,7 @@
},
{
"c": "stderr",
- "t": "source.cpp meta.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -584,7 +584,7 @@
},
{
"c": ",",
- "t": "source.cpp meta.function.c punctuation.separator.delimiter.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp comma.cpp punctuation.separator.delimiter.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -595,7 +595,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.function.c string.quoted.double.cpp punctuation.definition.string.begin.cpp",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp punctuation.definition.string.begin.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -606,7 +606,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.function.c string.quoted.double.cpp",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -617,7 +617,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.function.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp string.quoted.double.cpp punctuation.definition.string.end.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -628,7 +628,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.function.c punctuation.section.parameters.end.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -639,7 +639,7 @@
},
{
"c": ";",
- "t": "source.cpp punctuation.terminator.statement.c",
+ "t": "source.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -650,7 +650,7 @@
},
{
"c": "#",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c punctuation.definition.directive.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp punctuation.definition.directive.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -661,7 +661,7 @@
},
{
"c": "endif",
- "t": "source.cpp meta.preprocessor.c keyword.control.directive.conditional.c",
+ "t": "source.cpp meta.preprocessor.cpp keyword.control.directive.conditional.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -683,7 +683,7 @@
},
{
"c": "void",
- "t": "source.cpp storage.type.c",
+ "t": "source.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -705,7 +705,7 @@
},
{
"c": "main",
- "t": "source.cpp meta.function.c entity.name.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp entity.name.function.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -716,7 +716,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.function.c punctuation.section.parameters.begin.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -726,8 +726,8 @@
}
},
{
- "c": "O obj",
- "t": "source.cpp meta.function.c",
+ "c": "O ",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -736,9 +736,20 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "obj",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp variable.parameter.cpp",
+ "r": {
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "variable: #9CDCFE"
+ }
+ },
{
"c": ")",
- "t": "source.cpp meta.function.c punctuation.section.parameters.end.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -760,7 +771,7 @@
},
{
"c": "{",
- "t": "source.cpp meta.block.c punctuation.section.block.begin.bracket.curly.c",
+ "t": "source.cpp meta.block.cpp punctuation.section.block.begin.bracket.curly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -771,7 +782,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -782,7 +793,7 @@
},
{
"c": "LOG_INFO",
- "t": "source.cpp meta.block.c meta.function-call.c entity.name.function.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp entity.name.function.call.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -793,7 +804,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -804,7 +815,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp punctuation.definition.string.begin.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.begin.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -815,7 +826,7 @@
},
{
"c": "not hilighted as string",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -826,7 +837,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.end.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -837,7 +848,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -848,7 +859,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -859,7 +870,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -870,7 +881,7 @@
},
{
"c": "LOG_INFO",
- "t": "source.cpp meta.block.c meta.function-call.c entity.name.function.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp entity.name.function.call.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -881,7 +892,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -892,7 +903,7 @@
},
{
"c": "obj ",
- "t": "source.cpp meta.block.c meta.function-call.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -903,7 +914,7 @@
},
{
"c": "<<",
- "t": "source.cpp meta.block.c meta.function-call.c keyword.operator.bitwise.shift.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp keyword.operator.bitwise.shift.cpp",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -914,7 +925,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c meta.function-call.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -925,7 +936,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp punctuation.definition.string.begin.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.begin.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -936,7 +947,7 @@
},
{
"c": ", even worse; ",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -947,7 +958,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.end.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -958,7 +969,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c meta.function-call.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -969,7 +980,7 @@
},
{
"c": "<<",
- "t": "source.cpp meta.block.c meta.function-call.c keyword.operator.bitwise.shift.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp keyword.operator.bitwise.shift.cpp",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -979,8 +990,8 @@
}
},
{
- "c": " obj",
- "t": "source.cpp meta.block.c meta.function-call.c",
+ "c": " ",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -989,9 +1000,20 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "obj",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp variable.other.object.access.cpp",
+ "r": {
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "variable: #9CDCFE"
+ }
+ },
{
"c": ".",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.separator.dot-access.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.separator.dot-access.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1002,7 +1024,7 @@
},
{
"c": "x",
- "t": "source.cpp meta.block.c meta.function-call.c variable.other.member.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp variable.other.property.cpp",
"r": {
"dark_plus": "variable: #9CDCFE",
"light_plus": "variable: #001080",
@@ -1013,7 +1035,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c meta.function-call.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1024,7 +1046,7 @@
},
{
"c": "<<",
- "t": "source.cpp meta.block.c meta.function-call.c keyword.operator.bitwise.shift.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp keyword.operator.bitwise.shift.cpp",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -1035,7 +1057,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c meta.function-call.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1046,7 +1068,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp punctuation.definition.string.begin.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.begin.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1057,7 +1079,7 @@
},
{
"c": " check this out.",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1068,7 +1090,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.end.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1079,7 +1101,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1090,7 +1112,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1101,7 +1123,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c punctuation.whitespace.comment.leading.cpp",
+ "t": "source.cpp meta.block.cpp punctuation.whitespace.comment.leading.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1112,7 +1134,7 @@
},
{
"c": "//",
- "t": "source.cpp meta.block.c comment.line.double-slash.cpp punctuation.definition.comment.cpp",
+ "t": "source.cpp meta.block.cpp comment.line.double-slash.cpp punctuation.definition.comment.cpp",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
@@ -1123,7 +1145,7 @@
},
{
"c": " everything from this point on is interpeted as a string literal...",
- "t": "source.cpp meta.block.c comment.line.double-slash.cpp",
+ "t": "source.cpp meta.block.cpp comment.line.double-slash.cpp",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
@@ -1134,7 +1156,7 @@
},
{
"c": " O x",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1145,7 +1167,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1155,8 +1177,8 @@
}
},
{
- "c": " std",
- "t": "source.cpp meta.block.c",
+ "c": " ",
+ "t": "source.cpp meta.block.cpp meta.scope-resolution.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1165,9 +1187,20 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "std",
+ "t": "source.cpp meta.block.cpp meta.scope-resolution.cpp entity.name.type.namespace.scope-resolution.cpp",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
{
"c": "::",
- "t": "source.cpp meta.block.c punctuation.separator.namespace.access.cpp",
+ "t": "source.cpp meta.block.cpp meta.scope-resolution.cpp punctuation.separator.namespace.access.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1178,7 +1211,7 @@
},
{
"c": "unique_ptr",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1189,7 +1222,7 @@
},
{
"c": "<",
- "t": "source.cpp meta.block.c keyword.operator.comparison.c",
+ "t": "source.cpp meta.block.cpp keyword.operator.comparison.cpp",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -1200,7 +1233,7 @@
},
{
"c": "O",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1211,7 +1244,7 @@
},
{
"c": ">",
- "t": "source.cpp meta.block.c keyword.operator.comparison.c",
+ "t": "source.cpp meta.block.cpp keyword.operator.comparison.cpp",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -1222,7 +1255,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1233,7 +1266,7 @@
},
{
"c": "o",
- "t": "source.cpp meta.block.c meta.function-call.c entity.name.function.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp entity.name.function.call.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -1244,7 +1277,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1255,18 +1288,18 @@
},
{
"c": "new",
- "t": "source.cpp meta.block.c meta.function-call.c keyword.control.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp keyword.operator.wordlike.cpp alias.cpp keyword.operator.new.cpp",
"r": {
- "dark_plus": "keyword.control: #C586C0",
- "light_plus": "keyword.control: #AF00DB",
- "dark_vs": "keyword.control: #569CD6",
- "light_vs": "keyword.control: #0000FF",
- "hc_black": "keyword.control: #C586C0"
+ "dark_plus": "keyword.operator.new.cpp: #C586C0",
+ "light_plus": "keyword.operator.new.cpp: #AF00DB",
+ "dark_vs": "keyword.operator.new: #569CD6",
+ "light_vs": "keyword.operator.new: #0000FF",
+ "hc_black": "keyword.operator.new.cpp: #C586C0"
}
},
{
"c": " O",
- "t": "source.cpp meta.block.c meta.function-call.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1277,7 +1310,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1288,7 +1321,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1299,7 +1332,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c punctuation.whitespace.comment.leading.cpp",
+ "t": "source.cpp meta.block.cpp punctuation.whitespace.comment.leading.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1310,7 +1343,7 @@
},
{
"c": "//",
- "t": "source.cpp meta.block.c comment.line.double-slash.cpp punctuation.definition.comment.cpp",
+ "t": "source.cpp meta.block.cpp comment.line.double-slash.cpp punctuation.definition.comment.cpp",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
@@ -1321,7 +1354,7 @@
},
{
"c": " sadness.",
- "t": "source.cpp meta.block.c comment.line.double-slash.cpp",
+ "t": "source.cpp meta.block.cpp comment.line.double-slash.cpp",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
@@ -1332,7 +1365,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c punctuation.whitespace.support.function.leading.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1343,18 +1376,18 @@
},
{
"c": "sprintf",
- "t": "source.cpp meta.block.c support.function.C99.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp entity.name.function.call.cpp",
"r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
+ "hc_black": "entity.name.function: #DCDCAA"
}
},
{
"c": "(",
- "t": "source.cpp meta.block.c punctuation.section.parens.begin.bracket.round.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1365,7 +1398,7 @@
},
{
"c": "options",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1376,7 +1409,7 @@
},
{
"c": ",",
- "t": "source.cpp meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp comma.cpp punctuation.separator.delimiter.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1387,7 +1420,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1398,7 +1431,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.block.c string.quoted.double.cpp punctuation.definition.string.begin.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.begin.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1409,7 +1442,7 @@
},
{
"c": "STYLE=Keramik;TITLE=",
- "t": "source.cpp meta.block.c string.quoted.double.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1420,7 +1453,7 @@
},
{
"c": "%s",
- "t": "source.cpp meta.block.c string.quoted.double.cpp constant.other.placeholder.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp constant.other.placeholder.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1431,7 +1464,7 @@
},
{
"c": ";THEME=",
- "t": "source.cpp meta.block.c string.quoted.double.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1442,7 +1475,7 @@
},
{
"c": "%s",
- "t": "source.cpp meta.block.c string.quoted.double.cpp constant.other.placeholder.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp constant.other.placeholder.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1453,7 +1486,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.block.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.end.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1464,7 +1497,7 @@
},
{
"c": ",",
- "t": "source.cpp meta.block.c punctuation.separator.delimiter.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp comma.cpp punctuation.separator.delimiter.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1475,7 +1508,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1486,7 +1519,7 @@
},
{
"c": "...",
- "t": "source.cpp meta.block.c punctuation.separator.dot-access.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.vararg-ellipses.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1497,7 +1530,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.block.c punctuation.section.parens.end.bracket.round.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1508,7 +1541,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1519,7 +1552,7 @@
},
{
"c": "}",
- "t": "source.cpp meta.block.c punctuation.section.block.end.bracket.curly.c",
+ "t": "source.cpp meta.block.cpp punctuation.section.block.end.bracket.curly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1530,7 +1563,7 @@
},
{
"c": "int",
- "t": "source.cpp storage.type.c",
+ "t": "source.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -1552,7 +1585,7 @@
},
{
"c": "main2",
- "t": "source.cpp meta.function.c entity.name.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp entity.name.function.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -1563,7 +1596,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.function.c punctuation.section.parameters.begin.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1574,7 +1607,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.function.c punctuation.section.parameters.end.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1596,7 +1629,7 @@
},
{
"c": "{",
- "t": "source.cpp meta.block.c punctuation.section.block.begin.bracket.curly.c",
+ "t": "source.cpp meta.block.cpp punctuation.section.block.begin.bracket.curly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1607,7 +1640,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c punctuation.whitespace.support.function.leading.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1618,260 +1651,7 @@
},
{
"c": "printf",
- "t": "source.cpp meta.block.c support.function.C99.c",
- "r": {
- "dark_plus": "support.function: #DCDCAA",
- "light_plus": "support.function: #795E26",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "support.function: #DCDCAA"
- }
- },
- {
- "c": "(",
- "t": "source.cpp meta.block.c punctuation.section.parens.begin.bracket.round.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "\"",
- "t": "source.cpp meta.block.c string.quoted.double.cpp punctuation.definition.string.begin.cpp",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": ";",
- "t": "source.cpp meta.block.c string.quoted.double.cpp",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": "\"",
- "t": "source.cpp meta.block.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": ")",
- "t": "source.cpp meta.block.c punctuation.section.parens.end.bracket.round.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": " ",
- "t": "source.cpp meta.block.c punctuation.whitespace.comment.leading.cpp",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "//",
- "t": "source.cpp meta.block.c comment.line.double-slash.cpp punctuation.definition.comment.cpp",
- "r": {
- "dark_plus": "comment: #6A9955",
- "light_plus": "comment: #008000",
- "dark_vs": "comment: #6A9955",
- "light_vs": "comment: #008000",
- "hc_black": "comment: #7CA668"
- }
- },
- {
- "c": " the rest of",
- "t": "source.cpp meta.block.c comment.line.double-slash.cpp",
- "r": {
- "dark_plus": "comment: #6A9955",
- "light_plus": "comment: #008000",
- "dark_vs": "comment: #6A9955",
- "light_vs": "comment: #008000",
- "hc_black": "comment: #7CA668"
- }
- },
- {
- "c": " ",
- "t": "source.cpp meta.block.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "asm",
- "t": "source.cpp meta.block.c meta.function-call.c storage.type.c",
- "r": {
- "dark_plus": "storage.type: #569CD6",
- "light_plus": "storage.type: #0000FF",
- "dark_vs": "storage.type: #569CD6",
- "light_vs": "storage.type: #0000FF",
- "hc_black": "storage.type: #569CD6"
- }
- },
- {
- "c": "(",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.parens.begin.bracket.round.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "\"",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp punctuation.definition.string.begin.cpp",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": "movw $0x38, ",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": "%a",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp constant.other.placeholder.c",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": "x; ltr ",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": "%a",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp constant.other.placeholder.c",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": "x",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": "\"",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": ")",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.parens.end.bracket.round.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": " ",
- "t": "source.cpp meta.block.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "fn",
- "t": "source.cpp meta.block.c meta.function-call.c entity.name.function.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp entity.name.function.call.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -1882,7 +1662,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1893,7 +1673,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp punctuation.definition.string.begin.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.begin.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1903,8 +1683,8 @@
}
},
{
- "c": "{};",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp",
+ "c": ";",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1915,7 +1695,7 @@
},
{
"c": "\"",
- "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.end.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -1926,7 +1706,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1937,7 +1717,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1948,7 +1728,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c punctuation.whitespace.comment.leading.cpp",
+ "t": "source.cpp meta.block.cpp punctuation.whitespace.comment.leading.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1959,7 +1739,7 @@
},
{
"c": "//",
- "t": "source.cpp meta.block.c comment.line.double-slash.cpp punctuation.definition.comment.cpp",
+ "t": "source.cpp meta.block.cpp comment.line.double-slash.cpp punctuation.definition.comment.cpp",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
@@ -1970,7 +1750,150 @@
},
{
"c": " the rest of",
- "t": "source.cpp meta.block.c comment.line.double-slash.cpp",
+ "t": "source.cpp meta.block.cpp comment.line.double-slash.cpp",
+ "r": {
+ "dark_plus": "comment: #6A9955",
+ "light_plus": "comment: #008000",
+ "dark_vs": "comment: #6A9955",
+ "light_vs": "comment: #008000",
+ "hc_black": "comment: #7CA668"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.cpp meta.block.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "asm(\"movw $0x38, %ax; ltr %ax\");",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "fn",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp entity.name.function.call.cpp",
+ "r": {
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.function: #DCDCAA"
+ }
+ },
+ {
+ "c": "(",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.begin.bracket.round.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "\"",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.begin.cpp",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "{};",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "\"",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp string.quoted.double.cpp punctuation.definition.string.end.cpp",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": ")",
+ "t": "source.cpp meta.block.cpp meta.function-call.cpp punctuation.section.arguments.end.bracket.round.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": ";",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.cpp meta.block.cpp punctuation.whitespace.comment.leading.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "//",
+ "t": "source.cpp meta.block.cpp comment.line.double-slash.cpp punctuation.definition.comment.cpp",
+ "r": {
+ "dark_plus": "comment: #6A9955",
+ "light_plus": "comment: #008000",
+ "dark_vs": "comment: #6A9955",
+ "light_vs": "comment: #008000",
+ "hc_black": "comment: #7CA668"
+ }
+ },
+ {
+ "c": " the rest of",
+ "t": "source.cpp meta.block.cpp comment.line.double-slash.cpp",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
@@ -1981,7 +1904,7 @@
},
{
"c": "}",
- "t": "source.cpp meta.block.c punctuation.section.block.end.bracket.curly.c",
+ "t": "source.cpp meta.block.cpp punctuation.section.block.end.bracket.curly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
diff --git a/extensions/cpp/test/colorize-results/test_cpp.json b/extensions/cpp/test/colorize-results/test_cpp.json
index b3c9a841cc4..9702dc50b0b 100644
--- a/extensions/cpp/test/colorize-results/test_cpp.json
+++ b/extensions/cpp/test/colorize-results/test_cpp.json
@@ -23,7 +23,7 @@
},
{
"c": "#",
- "t": "source.cpp meta.preprocessor.include.c keyword.control.directive.include.c punctuation.definition.directive.c",
+ "t": "source.cpp meta.preprocessor.include.cpp keyword.control.directive.include.cpp punctuation.definition.directive.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -34,7 +34,7 @@
},
{
"c": "include",
- "t": "source.cpp meta.preprocessor.include.c keyword.control.directive.include.c",
+ "t": "source.cpp meta.preprocessor.include.cpp keyword.control.directive.include.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -45,7 +45,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.preprocessor.include.c",
+ "t": "source.cpp meta.preprocessor.include.cpp",
"r": {
"dark_plus": "meta.preprocessor: #569CD6",
"light_plus": "meta.preprocessor: #0000FF",
@@ -56,7 +56,7 @@
},
{
"c": "<",
- "t": "source.cpp meta.preprocessor.include.c string.quoted.other.lt-gt.include.c punctuation.definition.string.begin.c",
+ "t": "source.cpp meta.preprocessor.include.cpp string.quoted.other.lt-gt.include.cpp punctuation.definition.string.begin.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -67,7 +67,7 @@
},
{
"c": "iostream",
- "t": "source.cpp meta.preprocessor.include.c string.quoted.other.lt-gt.include.c",
+ "t": "source.cpp meta.preprocessor.include.cpp string.quoted.other.lt-gt.include.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -78,7 +78,7 @@
},
{
"c": ">",
- "t": "source.cpp meta.preprocessor.include.c string.quoted.other.lt-gt.include.c punctuation.definition.string.end.c",
+ "t": "source.cpp meta.preprocessor.include.cpp string.quoted.other.lt-gt.include.cpp punctuation.definition.string.end.cpp",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string: #A31515",
@@ -89,18 +89,18 @@
},
{
"c": "using",
- "t": "source.cpp meta.using-namespace-declaration.cpp keyword.control.cpp",
+ "t": "source.cpp meta.using-namespace.cpp keyword.other.using.directive.cpp",
"r": {
- "dark_plus": "keyword.control: #C586C0",
- "light_plus": "keyword.control: #AF00DB",
- "dark_vs": "keyword.control: #569CD6",
- "light_vs": "keyword.control: #0000FF",
- "hc_black": "keyword.control: #C586C0"
+ "dark_plus": "keyword.other.using: #C586C0",
+ "light_plus": "keyword.other.using: #AF00DB",
+ "dark_vs": "keyword: #569CD6",
+ "light_vs": "keyword: #0000FF",
+ "hc_black": "keyword.other.using: #C586C0"
}
},
{
"c": " ",
- "t": "source.cpp meta.using-namespace-declaration.cpp",
+ "t": "source.cpp meta.using-namespace.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -111,7 +111,7 @@
},
{
"c": "namespace",
- "t": "source.cpp meta.using-namespace-declaration.cpp storage.type.cpp",
+ "t": "source.cpp meta.using-namespace.cpp keyword.other.namespace.directive.cpp storage.type.namespace.directive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -122,7 +122,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.using-namespace-declaration.cpp",
+ "t": "source.cpp meta.using-namespace.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -133,7 +133,7 @@
},
{
"c": "std",
- "t": "source.cpp meta.using-namespace-declaration.cpp entity.name.type.cpp",
+ "t": "source.cpp meta.using-namespace.cpp entity.name.type.namespace.cpp",
"r": {
"dark_plus": "entity.name.type: #4EC9B0",
"light_plus": "entity.name.type: #267F99",
@@ -144,7 +144,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.using-namespace-declaration.cpp",
+ "t": "source.cpp meta.using-namespace.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -155,7 +155,7 @@
},
{
"c": "class",
- "t": "source.cpp meta.class-struct-block.cpp storage.type.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.head.class.cpp storage.type.class.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -166,7 +166,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.class-struct-block.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.head.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -177,7 +177,7 @@
},
{
"c": "Rectangle",
- "t": "source.cpp meta.class-struct-block.cpp entity.name.type.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.head.class.cpp entity.name.type.class.cpp",
"r": {
"dark_plus": "entity.name.type: #4EC9B0",
"light_plus": "entity.name.type: #267F99",
@@ -188,7 +188,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.class-struct-block.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.head.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -199,7 +199,7 @@
},
{
"c": "{",
- "t": "source.cpp meta.class-struct-block.cpp punctuation.section.block.begin.bracket.curly.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.head.class.cpp punctuation.section.block.begin.bracket.curly.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -210,7 +210,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.class-struct-block.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -221,7 +221,7 @@
},
{
"c": "int",
- "t": "source.cpp meta.class-struct-block.cpp storage.type.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -232,7 +232,7 @@
},
{
"c": " width",
- "t": "source.cpp meta.class-struct-block.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -243,7 +243,7 @@
},
{
"c": ",",
- "t": "source.cpp meta.class-struct-block.cpp punctuation.separator.delimiter.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp comma.cpp punctuation.separator.delimiter.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -254,7 +254,7 @@
},
{
"c": " height",
- "t": "source.cpp meta.class-struct-block.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -265,7 +265,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.class-struct-block.cpp punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -276,7 +276,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.class-struct-block.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -286,19 +286,30 @@
}
},
{
- "c": "public:",
- "t": "source.cpp meta.class-struct-block.cpp storage.modifier.cpp",
+ "c": "public",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp storage.type.modifier.access.control.public.cpp",
"r": {
- "dark_plus": "storage.modifier: #569CD6",
- "light_plus": "storage.modifier: #0000FF",
- "dark_vs": "storage.modifier: #569CD6",
- "light_vs": "storage.modifier: #0000FF",
- "hc_black": "storage.modifier: #569CD6"
+ "dark_plus": "storage.type: #569CD6",
+ "light_plus": "storage.type: #0000FF",
+ "dark_vs": "storage.type: #569CD6",
+ "light_vs": "storage.type: #0000FF",
+ "hc_black": "storage.type: #569CD6"
+ }
+ },
+ {
+ "c": ":",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp storage.type.modifier.access.control.public.cpp colon.cpp",
+ "r": {
+ "dark_plus": "storage.type: #569CD6",
+ "light_plus": "storage.type: #0000FF",
+ "dark_vs": "storage.type: #569CD6",
+ "light_vs": "storage.type: #0000FF",
+ "hc_black": "storage.type: #569CD6"
}
},
{
"c": " ",
- "t": "source.cpp meta.class-struct-block.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -309,7 +320,7 @@
},
{
"c": "void",
- "t": "source.cpp meta.class-struct-block.cpp storage.type.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -320,7 +331,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.class-struct-block.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -331,7 +342,7 @@
},
{
"c": "set_values",
- "t": "source.cpp meta.class-struct-block.cpp meta.function.c entity.name.function.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp entity.name.function.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -342,7 +353,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.class-struct-block.cpp meta.function.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -353,7 +364,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.class-struct-block.cpp meta.function.c punctuation.section.parameters.begin.bracket.round.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -364,7 +375,7 @@
},
{
"c": "int",
- "t": "source.cpp meta.class-struct-block.cpp meta.function.c storage.type.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -375,7 +386,7 @@
},
{
"c": ",",
- "t": "source.cpp meta.class-struct-block.cpp meta.function.c punctuation.separator.delimiter.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp comma.cpp punctuation.separator.delimiter.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -386,7 +397,7 @@
},
{
"c": "int",
- "t": "source.cpp meta.class-struct-block.cpp meta.function.c storage.type.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -397,7 +408,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.class-struct-block.cpp meta.function.c punctuation.section.parameters.end.bracket.round.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -408,7 +419,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.class-struct-block.cpp punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -419,7 +430,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.class-struct-block.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -430,7 +441,7 @@
},
{
"c": "int",
- "t": "source.cpp meta.class-struct-block.cpp storage.type.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -441,7 +452,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.class-struct-block.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -452,7 +463,7 @@
},
{
"c": "area",
- "t": "source.cpp meta.class-struct-block.cpp meta.function.c entity.name.function.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp entity.name.function.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -463,7 +474,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.class-struct-block.cpp meta.function.c punctuation.section.parameters.begin.bracket.round.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -474,7 +485,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.class-struct-block.cpp meta.function.c punctuation.section.parameters.end.bracket.round.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -485,7 +496,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.class-struct-block.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -496,7 +507,7 @@
},
{
"c": "{",
- "t": "source.cpp meta.class-struct-block.cpp meta.block.c punctuation.section.block.begin.bracket.curly.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.block.cpp punctuation.section.block.begin.bracket.curly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -507,7 +518,7 @@
},
{
"c": "return",
- "t": "source.cpp meta.class-struct-block.cpp meta.block.c keyword.control.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.block.cpp keyword.control.return.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -518,7 +529,7 @@
},
{
"c": " width",
- "t": "source.cpp meta.class-struct-block.cpp meta.block.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -529,7 +540,7 @@
},
{
"c": "*",
- "t": "source.cpp meta.class-struct-block.cpp meta.block.c keyword.operator.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.block.cpp keyword.operator.cpp",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -540,7 +551,7 @@
},
{
"c": "height",
- "t": "source.cpp meta.class-struct-block.cpp meta.block.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -551,7 +562,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.class-struct-block.cpp meta.block.c punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.block.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -562,7 +573,7 @@
},
{
"c": "}",
- "t": "source.cpp meta.class-struct-block.cpp meta.block.c punctuation.section.block.end.bracket.curly.c",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp meta.block.cpp punctuation.section.block.end.bracket.curly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -573,7 +584,7 @@
},
{
"c": "}",
- "t": "source.cpp meta.class-struct-block.cpp punctuation.section.block.end.bracket.curly.cpp",
+ "t": "source.cpp meta.block.class.cpp meta.body.class.cpp punctuation.section.block.end.bracket.curly.class.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -584,7 +595,7 @@
},
{
"c": ";",
- "t": "source.cpp punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.class.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -595,7 +606,7 @@
},
{
"c": "void",
- "t": "source.cpp storage.type.c",
+ "t": "source.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -606,7 +617,7 @@
},
{
"c": " ",
- "t": "source.cpp",
+ "t": "source.cpp meta.scope-resolution.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -616,8 +627,30 @@
}
},
{
- "c": "Rectangle::set_values",
- "t": "source.cpp meta.function.c entity.name.function.c",
+ "c": "Rectangle",
+ "t": "source.cpp meta.scope-resolution.cpp entity.name.type.namespace.scope-resolution.cpp",
+ "r": {
+ "dark_plus": "entity.name.type: #4EC9B0",
+ "light_plus": "entity.name.type: #267F99",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.type: #4EC9B0"
+ }
+ },
+ {
+ "c": "::",
+ "t": "source.cpp meta.scope-resolution.cpp punctuation.separator.namespace.access.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "set_values",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp entity.name.function.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -628,7 +661,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -639,7 +672,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.function.c punctuation.section.parameters.begin.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -650,7 +683,7 @@
},
{
"c": "int",
- "t": "source.cpp meta.function.c storage.type.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -660,8 +693,8 @@
}
},
{
- "c": " x",
- "t": "source.cpp meta.function.c",
+ "c": " ",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -670,9 +703,20 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "x",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp variable.parameter.cpp",
+ "r": {
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "variable: #9CDCFE"
+ }
+ },
{
"c": ",",
- "t": "source.cpp meta.function.c punctuation.separator.delimiter.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp comma.cpp punctuation.separator.delimiter.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -683,7 +727,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -694,7 +738,7 @@
},
{
"c": "int",
- "t": "source.cpp meta.function.c storage.type.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -704,8 +748,8 @@
}
},
{
- "c": " y",
- "t": "source.cpp meta.function.c",
+ "c": " ",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -714,9 +758,20 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "y",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp variable.parameter.cpp",
+ "r": {
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "variable: #9CDCFE"
+ }
+ },
{
"c": ")",
- "t": "source.cpp meta.function.c punctuation.section.parameters.end.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -738,7 +793,7 @@
},
{
"c": "{",
- "t": "source.cpp meta.block.c punctuation.section.block.begin.bracket.curly.c",
+ "t": "source.cpp meta.block.cpp punctuation.section.block.begin.bracket.curly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -749,7 +804,7 @@
},
{
"c": " width ",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -760,7 +815,7 @@
},
{
"c": "=",
- "t": "source.cpp meta.block.c keyword.operator.assignment.c",
+ "t": "source.cpp meta.block.cpp keyword.operator.assignment.cpp",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -771,7 +826,7 @@
},
{
"c": " x",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -782,7 +837,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -793,7 +848,7 @@
},
{
"c": " height ",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -804,7 +859,7 @@
},
{
"c": "=",
- "t": "source.cpp meta.block.c keyword.operator.assignment.c",
+ "t": "source.cpp meta.block.cpp keyword.operator.assignment.cpp",
"r": {
"dark_plus": "keyword.operator: #D4D4D4",
"light_plus": "keyword.operator: #000000",
@@ -815,7 +870,7 @@
},
{
"c": " y",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -826,7 +881,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -837,7 +892,7 @@
},
{
"c": "}",
- "t": "source.cpp meta.block.c punctuation.section.block.end.bracket.curly.c",
+ "t": "source.cpp meta.block.cpp punctuation.section.block.end.bracket.curly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -848,7 +903,7 @@
},
{
"c": "int",
- "t": "source.cpp storage.type.c",
+ "t": "source.cpp storage.type.primitive.cpp",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
@@ -870,7 +925,7 @@
},
{
"c": "main",
- "t": "source.cpp meta.function.c entity.name.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp entity.name.function.cpp",
"r": {
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
@@ -881,7 +936,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.function.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -892,7 +947,7 @@
},
{
"c": "(",
- "t": "source.cpp meta.function.c punctuation.section.parameters.begin.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.begin.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -903,7 +958,7 @@
},
{
"c": ")",
- "t": "source.cpp meta.function.c punctuation.section.parameters.end.bracket.round.c",
+ "t": "source.cpp meta.function.definition.parameters.cpp meta.function.definition.parameters.cpp punctuation.section.parameters.end.bracket.round.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -925,7 +980,7 @@
},
{
"c": "{",
- "t": "source.cpp meta.block.c punctuation.section.block.begin.bracket.curly.c",
+ "t": "source.cpp meta.block.cpp punctuation.section.block.begin.bracket.curly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -936,7 +991,7 @@
},
{
"c": " Rectangle rect",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -947,271 +1002,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": " rect",
- "t": "source.cpp meta.block.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": ".",
- "t": "source.cpp meta.block.c punctuation.separator.dot-access.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "set_values",
- "t": "source.cpp meta.block.c meta.function-call.c entity.name.function.c",
- "r": {
- "dark_plus": "entity.name.function: #DCDCAA",
- "light_plus": "entity.name.function: #795E26",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "entity.name.function: #DCDCAA"
- }
- },
- {
- "c": " ",
- "t": "source.cpp meta.block.c meta.function-call.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "(",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "3",
- "t": "source.cpp meta.block.c meta.function-call.c constant.numeric.c",
- "r": {
- "dark_plus": "constant.numeric: #B5CEA8",
- "light_plus": "constant.numeric: #09885A",
- "dark_vs": "constant.numeric: #B5CEA8",
- "light_vs": "constant.numeric: #09885A",
- "hc_black": "constant.numeric: #B5CEA8"
- }
- },
- {
- "c": ",",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.separator.delimiter.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "4",
- "t": "source.cpp meta.block.c meta.function-call.c constant.numeric.c",
- "r": {
- "dark_plus": "constant.numeric: #B5CEA8",
- "light_plus": "constant.numeric: #09885A",
- "dark_vs": "constant.numeric: #B5CEA8",
- "light_vs": "constant.numeric: #09885A",
- "hc_black": "constant.numeric: #B5CEA8"
- }
- },
- {
- "c": ")",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": " cout ",
- "t": "source.cpp meta.block.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "<<",
- "t": "source.cpp meta.block.c keyword.operator.bitwise.shift.c",
- "r": {
- "dark_plus": "keyword.operator: #D4D4D4",
- "light_plus": "keyword.operator: #000000",
- "dark_vs": "keyword.operator: #D4D4D4",
- "light_vs": "keyword.operator: #000000",
- "hc_black": "keyword.operator: #D4D4D4"
- }
- },
- {
- "c": " ",
- "t": "source.cpp meta.block.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "\"",
- "t": "source.cpp meta.block.c string.quoted.double.cpp punctuation.definition.string.begin.cpp",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": "area: ",
- "t": "source.cpp meta.block.c string.quoted.double.cpp",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": "\"",
- "t": "source.cpp meta.block.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
- "r": {
- "dark_plus": "string: #CE9178",
- "light_plus": "string: #A31515",
- "dark_vs": "string: #CE9178",
- "light_vs": "string: #A31515",
- "hc_black": "string: #CE9178"
- }
- },
- {
- "c": " ",
- "t": "source.cpp meta.block.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "<<",
- "t": "source.cpp meta.block.c keyword.operator.bitwise.shift.c",
- "r": {
- "dark_plus": "keyword.operator: #D4D4D4",
- "light_plus": "keyword.operator: #000000",
- "dark_vs": "keyword.operator: #D4D4D4",
- "light_vs": "keyword.operator: #000000",
- "hc_black": "keyword.operator: #D4D4D4"
- }
- },
- {
- "c": " rect",
- "t": "source.cpp meta.block.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": ".",
- "t": "source.cpp meta.block.c punctuation.separator.dot-access.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "area",
- "t": "source.cpp meta.block.c meta.function-call.c entity.name.function.c",
- "r": {
- "dark_plus": "entity.name.function: #DCDCAA",
- "light_plus": "entity.name.function: #795E26",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "entity.name.function: #DCDCAA"
- }
- },
- {
- "c": "(",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.begin.bracket.round.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": ")",
- "t": "source.cpp meta.block.c meta.function-call.c punctuation.section.arguments.end.bracket.round.c",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1222,7 +1013,293 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "rect",
+ "t": "source.cpp meta.block.cpp variable.other.object.access.cpp",
+ "r": {
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "variable: #9CDCFE"
+ }
+ },
+ {
+ "c": ".",
+ "t": "source.cpp meta.block.cpp punctuation.separator.dot-access.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "set_values",
+ "t": "source.cpp meta.block.cpp variable.other.property.cpp",
+ "r": {
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "variable: #9CDCFE"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.cpp meta.block.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "(",
+ "t": "source.cpp meta.block.cpp meta.parens.block.cpp punctuation.section.parens.begin.bracket.round.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "3",
+ "t": "source.cpp meta.block.cpp meta.parens.block.cpp constant.numeric.decimal.cpp",
+ "r": {
+ "dark_plus": "constant.numeric: #B5CEA8",
+ "light_plus": "constant.numeric: #09885A",
+ "dark_vs": "constant.numeric: #B5CEA8",
+ "light_vs": "constant.numeric: #09885A",
+ "hc_black": "constant.numeric: #B5CEA8"
+ }
+ },
+ {
+ "c": ",",
+ "t": "source.cpp meta.block.cpp meta.parens.block.cpp comma.cpp punctuation.separator.delimiter.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "4",
+ "t": "source.cpp meta.block.cpp meta.parens.block.cpp constant.numeric.decimal.cpp",
+ "r": {
+ "dark_plus": "constant.numeric: #B5CEA8",
+ "light_plus": "constant.numeric: #09885A",
+ "dark_vs": "constant.numeric: #B5CEA8",
+ "light_vs": "constant.numeric: #09885A",
+ "hc_black": "constant.numeric: #B5CEA8"
+ }
+ },
+ {
+ "c": ")",
+ "t": "source.cpp meta.block.cpp meta.parens.block.cpp punctuation.section.parens.end.bracket.round.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": ";",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " cout ",
+ "t": "source.cpp meta.block.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "<<",
+ "t": "source.cpp meta.block.cpp keyword.operator.bitwise.shift.cpp",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.cpp meta.block.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "\"",
+ "t": "source.cpp meta.block.cpp string.quoted.double.cpp punctuation.definition.string.begin.cpp",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "area: ",
+ "t": "source.cpp meta.block.cpp string.quoted.double.cpp",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "\"",
+ "t": "source.cpp meta.block.cpp string.quoted.double.cpp punctuation.definition.string.end.cpp",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string: #A31515",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string: #A31515",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.cpp meta.block.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "<<",
+ "t": "source.cpp meta.block.cpp keyword.operator.bitwise.shift.cpp",
+ "r": {
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.cpp meta.block.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "rect",
+ "t": "source.cpp meta.block.cpp variable.other.object.access.cpp",
+ "r": {
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "variable: #9CDCFE"
+ }
+ },
+ {
+ "c": ".",
+ "t": "source.cpp meta.block.cpp punctuation.separator.dot-access.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "area",
+ "t": "source.cpp meta.block.cpp entity.name.function.member.cpp",
+ "r": {
+ "dark_plus": "entity.name.function: #DCDCAA",
+ "light_plus": "entity.name.function: #795E26",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "entity.name.function: #DCDCAA"
+ }
+ },
+ {
+ "c": "(",
+ "t": "source.cpp meta.block.cpp punctuation.section.arguments.begin.bracket.round.function.member.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": ")",
+ "t": "source.cpp meta.block.cpp punctuation.section.arguments.end.bracket.round.function.member.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": ";",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1233,7 +1310,7 @@
},
{
"c": "return",
- "t": "source.cpp meta.block.c keyword.control.c",
+ "t": "source.cpp meta.block.cpp keyword.control.return.cpp",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@@ -1244,7 +1321,7 @@
},
{
"c": " ",
- "t": "source.cpp meta.block.c",
+ "t": "source.cpp meta.block.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1255,7 +1332,7 @@
},
{
"c": "0",
- "t": "source.cpp meta.block.c constant.numeric.c",
+ "t": "source.cpp meta.block.cpp constant.numeric.decimal.cpp",
"r": {
"dark_plus": "constant.numeric: #B5CEA8",
"light_plus": "constant.numeric: #09885A",
@@ -1266,7 +1343,7 @@
},
{
"c": ";",
- "t": "source.cpp meta.block.c punctuation.terminator.statement.c",
+ "t": "source.cpp meta.block.cpp punctuation.terminator.statement.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@@ -1277,7 +1354,7 @@
},
{
"c": "}",
- "t": "source.cpp meta.block.c punctuation.section.block.end.bracket.curly.c",
+ "t": "source.cpp meta.block.cpp punctuation.section.block.end.bracket.curly.cpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
diff --git a/extensions/csharp/cgmanifest.json b/extensions/csharp/cgmanifest.json
index 58cb2a2cef0..beef7f27b8f 100644
--- a/extensions/csharp/cgmanifest.json
+++ b/extensions/csharp/cgmanifest.json
@@ -6,7 +6,7 @@
"git": {
"name": "dotnet/csharp-tmLanguage",
"repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage",
- "commitHash": "b95e4044ff1ac52e03f622de76f459dc5388954c"
+ "commitHash": "ad7514e8d78542a6ee37f6187091cd4102eb3797"
}
},
"license": "MIT",
@@ -15,4 +15,4 @@
}
],
"version": 1
-}
+}
\ No newline at end of file
diff --git a/extensions/csharp/syntaxes/csharp.tmLanguage.json b/extensions/csharp/syntaxes/csharp.tmLanguage.json
index 31fb9c6b818..4d80bcc364e 100644
--- a/extensions/csharp/syntaxes/csharp.tmLanguage.json
+++ b/extensions/csharp/syntaxes/csharp.tmLanguage.json
@@ -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/dotnet/csharp-tmLanguage/commit/b95e4044ff1ac52e03f622de76f459dc5388954c",
+ "version": "https://github.com/dotnet/csharp-tmLanguage/commit/ad7514e8d78542a6ee37f6187091cd4102eb3797",
"name": "C#",
"scopeName": "source.cs",
"patterns": [
@@ -2150,7 +2150,7 @@
]
},
"local-variable-declaration": {
- "begin": "(?x)\n(?:\n (?:(\\bref)\\s+(?:(\\breadonly)\\s+)?)?(\\bvar\\b)| # ref local\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref local\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=|\\))",
+ "begin": "(?x)\n(?:\n (?:(\\bref)\\s+(?:(\\breadonly)\\s+)?)?(\\bvar\\b)| # ref local\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref local\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s*\n(?!=>)\n(?=,|;|=|\\))",
"beginCaptures": {
"1": {
"name": "storage.modifier.cs"
diff --git a/extensions/csharp/test/colorize-results/test_cs.json b/extensions/csharp/test/colorize-results/test_cs.json
index 1fc73fb341c..dbbe61ef3c6 100644
--- a/extensions/csharp/test/colorize-results/test_cs.json
+++ b/extensions/csharp/test/colorize-results/test_cs.json
@@ -3,11 +3,11 @@
"c": "using",
"t": "source.cs keyword.other.using.cs",
"r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
+ "dark_plus": "keyword.other.using: #C586C0",
+ "light_plus": "keyword.other.using: #AF00DB",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
+ "hc_black": "keyword.other.using: #C586C0"
}
},
{
diff --git a/extensions/css-language-features/.vscode/launch.json b/extensions/css-language-features/.vscode/launch.json
index d6393141c5d..4f7166e6dce 100644
--- a/extensions/css-language-features/.vscode/launch.json
+++ b/extensions/css-language-features/.vscode/launch.json
@@ -23,8 +23,7 @@
"outFiles": [
"${workspaceFolder}/client/out/**/*.js"
],
- "smartStep": true,
- "preLaunchTask": "npm: compile"
+ "smartStep": true
},
{
"name": "Launch Tests",
@@ -39,8 +38,7 @@
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/client/out/test/**/*.js"
- ],
- "preLaunchTask": "npm: compile"
+ ]
},
{
"name": "Attach Language Server",
diff --git a/extensions/css-language-features/.vscode/settings.json b/extensions/css-language-features/.vscode/settings.json
new file mode 100644
index 00000000000..5b30e2983c2
--- /dev/null
+++ b/extensions/css-language-features/.vscode/settings.json
@@ -0,0 +1,5 @@
+{
+ "prettier.semi": true,
+ "prettier.singleQuote": true,
+ "prettier.printWidth": 120,
+}
\ No newline at end of file
diff --git a/extensions/css-language-features/client/src/cssMain.ts b/extensions/css-language-features/client/src/cssMain.ts
index 6e0f2eb77c7..8d8542f5a1e 100644
--- a/extensions/css-language-features/client/src/cssMain.ts
+++ b/extensions/css-language-features/client/src/cssMain.ts
@@ -9,8 +9,9 @@ import * as fs from 'fs';
import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle();
-import { languages, window, commands, ExtensionContext, Range, Position, CompletionItem, CompletionItemKind, TextEdit, SnippetString } from 'vscode';
+import { languages, window, commands, ExtensionContext, Range, Position, CompletionItem, CompletionItemKind, TextEdit, SnippetString, workspace, TextDocument, SelectionRange } from 'vscode';
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, Disposable } from 'vscode-languageclient';
+import { getCustomDataPathsInAllWorkspaces, getCustomDataPathsFromAllExtensions } from './customData';
// this method is called when vs code is activated
export function activate(context: ExtensionContext) {
@@ -30,6 +31,11 @@ export function activate(context: ExtensionContext) {
let documentSelector = ['css', 'scss', 'less'];
+ let dataPaths = [
+ ...getCustomDataPathsInAllWorkspaces(workspace.workspaceFolders),
+ ...getCustomDataPathsFromAllExtensions()
+ ];
+
// Options to control the language client
let clientOptions: LanguageClientOptions = {
documentSelector,
@@ -37,6 +43,7 @@ export function activate(context: ExtensionContext) {
configurationSection: ['css', 'scss', 'less']
},
initializationOptions: {
+ dataPaths
}
};
@@ -71,6 +78,26 @@ export function activate(context: ExtensionContext) {
client.onReady().then(() => {
context.subscriptions.push(initCompletionProvider());
+
+ documentSelector.forEach(selector => {
+ context.subscriptions.push(languages.registerSelectionRangeProvider(selector, {
+ async provideSelectionRanges(document: TextDocument, positions: Position[]): Promise {
+ const textDocument = client.code2ProtocolConverter.asTextDocumentIdentifier(document);
+ const rawResult = await client.sendRequest('$/textDocument/selectionRanges', { textDocument, positions: positions.map(client.code2ProtocolConverter.asPosition) });
+ if (Array.isArray(rawResult)) {
+ return rawResult.map(rawSelectionRanges => {
+ return rawSelectionRanges.reduceRight((parent: SelectionRange | undefined, selectionRange: SelectionRange) => {
+ return {
+ range: client.protocol2CodeConverter.asRange(selectionRange.range),
+ parent
+ };
+ }, undefined)!;
+ });
+ }
+ return [];
+ }
+ }));
+ });
});
function initCompletionProvider(): Disposable {
diff --git a/extensions/css-language-features/client/src/customData.ts b/extensions/css-language-features/client/src/customData.ts
new file mode 100644
index 00000000000..b812b133ddc
--- /dev/null
+++ b/extensions/css-language-features/client/src/customData.ts
@@ -0,0 +1,60 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import * as path from 'path';
+import { workspace, WorkspaceFolder, extensions } from 'vscode';
+
+interface ExperimentalConfig {
+ experimental?: {
+ customData?: string[];
+ };
+}
+
+export function getCustomDataPathsInAllWorkspaces(workspaceFolders: WorkspaceFolder[] | undefined): string[] {
+ const dataPaths: string[] = [];
+
+ if (!workspaceFolders) {
+ return dataPaths;
+ }
+
+ workspaceFolders.forEach(wf => {
+ const allCssConfig = workspace.getConfiguration(undefined, wf.uri);
+ const wfCSSConfig = allCssConfig.inspect('css');
+ if (
+ wfCSSConfig &&
+ wfCSSConfig.workspaceFolderValue &&
+ wfCSSConfig.workspaceFolderValue.experimental &&
+ wfCSSConfig.workspaceFolderValue.experimental.customData
+ ) {
+ const customData = wfCSSConfig.workspaceFolderValue.experimental.customData;
+ if (Array.isArray(customData)) {
+ customData.forEach(t => {
+ if (typeof t === 'string') {
+ dataPaths.push(path.resolve(wf.uri.fsPath, t));
+ }
+ });
+ }
+ }
+ });
+
+ return dataPaths;
+}
+
+export function getCustomDataPathsFromAllExtensions(): string[] {
+ const dataPaths: string[] = [];
+
+ for (const extension of extensions.all) {
+ const contributes = extension.packageJSON && extension.packageJSON.contributes;
+
+ if (contributes && contributes.css && contributes.css.experimental.customData && Array.isArray(contributes.css.experimental.customData)) {
+ const relativePaths: string[] = contributes.css.experimental.customData;
+ relativePaths.forEach(rp => {
+ dataPaths.push(path.resolve(extension.extensionPath, rp));
+ });
+ }
+ }
+
+ return dataPaths;
+}
diff --git a/extensions/css-language-features/client/src/typings/ref.d.ts b/extensions/css-language-features/client/src/typings/ref.d.ts
index 9c1a5df18ed..de602d3f8d6 100644
--- a/extensions/css-language-features/client/src/typings/ref.d.ts
+++ b/extensions/css-language-features/client/src/typings/ref.d.ts
@@ -2,5 +2,5 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-
///
+///
diff --git a/extensions/css-language-features/package.json b/extensions/css-language-features/package.json
index 3e5f4cf62e5..0b2e83c1d8d 100644
--- a/extensions/css-language-features/package.json
+++ b/extensions/css-language-features/package.json
@@ -5,7 +5,7 @@
"version": "1.0.0",
"publisher": "vscode",
"engines": {
- "vscode": "0.10.x"
+ "vscode": "^1.29.0"
},
"icon": "icons/css.png",
"activationEvents": [
@@ -15,6 +15,7 @@
"onCommand:_css.applyCodeAction"
],
"main": "./client/out/cssMain",
+ "enableProposedApi": true,
"scripts": {
"compile": "gulp compile-extension:css-language-features-client compile-extension:css-language-features-server",
"watch": "gulp watch-extension:css-language-features-client watch-extension:css-language-features-server",
@@ -32,19 +33,27 @@
"id": "css",
"title": "%css.title%",
"properties": {
+ "css.experimental.customData": {
+ "type": "array",
+ "description": "A list of JSON file paths that define custom CSS data that loads custom properties, at directives, pseudo classes / elements.",
+ "default": [],
+ "items": {
+ "type": "string"
+ },
+ "scope": "resource"
+ },
+ "css.completion.triggerPropertyValueCompletion": {
+ "type": "boolean",
+ "scope": "resource",
+ "default": true,
+ "description": "%css.completion.triggerPropertyValueCompletion.desc%"
+ },
"css.validate": {
"type": "boolean",
"scope": "resource",
"default": true,
"description": "%css.validate.desc%"
},
- "css.colorDecorators.enable": {
- "type": "boolean",
- "scope": "window",
- "default": true,
- "description": "%css.colorDecorators.enable.desc%",
- "deprecationMessage": "%css.colorDecorators.enable.deprecationMessage%"
- },
"css.lint.compatibleVendorPrefixes": {
"type": "string",
"scope": "resource",
@@ -288,13 +297,6 @@
"default": true,
"description": "%scss.validate.desc%"
},
- "scss.colorDecorators.enable": {
- "type": "boolean",
- "scope": "window",
- "default": true,
- "description": "%scss.colorDecorators.enable.desc%",
- "deprecationMessage": "%scss.colorDecorators.enable.deprecationMessage%"
- },
"scss.lint.compatibleVendorPrefixes": {
"type": "string",
"scope": "resource",
@@ -517,13 +519,6 @@
"default": true,
"description": "%less.validate.desc%"
},
- "less.colorDecorators.enable": {
- "type": "boolean",
- "scope": "window",
- "default": true,
- "description": "%less.colorDecorators.enable.desc%",
- "deprecationMessage": "%less.colorDecorators.enable.deprecationMessage%"
- },
"less.lint.compatibleVendorPrefixes": {
"type": "string",
"scope": "resource",
@@ -737,11 +732,11 @@
]
},
"dependencies": {
- "vscode-languageclient": "^5.1.0",
+ "vscode-languageclient": "^5.2.1",
"vscode-nls": "^4.0.0"
},
"devDependencies": {
- "@types/node": "^8.10.25",
+ "@types/node": "^10.12.21",
"mocha": "^5.2.0"
}
}
diff --git a/extensions/css-language-features/package.nls.json b/extensions/css-language-features/package.nls.json
index 56eeb384643..3e890bfd9bd 100644
--- a/extensions/css-language-features/package.nls.json
+++ b/extensions/css-language-features/package.nls.json
@@ -2,6 +2,7 @@
"displayName": "CSS Language Features",
"description": "Provides rich language support for CSS, LESS and SCSS files.",
"css.title": "CSS",
+ "css.completion.triggerPropertyValueCompletion.desc": "By default, VS Code triggers property value completion after selecting a CSS property. Use this setting to disable this behavior.",
"css.lint.argumentsInColorFunction.desc": "Invalid number of parameters.",
"css.lint.boxModel.desc": "Do not use `width` or `height` when using `padding` or `border`.",
"css.lint.compatibleVendorPrefixes.desc": "When using a vendor-specific prefix make sure to also include all other vendor-specific properties.",
@@ -69,10 +70,7 @@
"scss.lint.zeroUnits.desc": "No unit for zero needed.",
"scss.validate.title": "Controls SCSS validation and problem severities.",
"scss.validate.desc": "Enables or disables all validations.",
- "less.colorDecorators.enable.desc": "Enables or disables color decorators.",
- "scss.colorDecorators.enable.desc": "Enables or disables color decorators.",
- "css.colorDecorators.enable.desc": "Enables or disables color decorators.",
"css.colorDecorators.enable.deprecationMessage": "The setting `css.colorDecorators.enable` has been deprecated in favor of `editor.colorDecorators`.",
"scss.colorDecorators.enable.deprecationMessage": "The setting `scss.colorDecorators.enable` has been deprecated in favor of `editor.colorDecorators`.",
"less.colorDecorators.enable.deprecationMessage": "The setting `less.colorDecorators.enable` has been deprecated in favor of `editor.colorDecorators`."
-}
\ No newline at end of file
+}
diff --git a/extensions/css-language-features/server/extension.webpack.config.js b/extensions/css-language-features/server/extension.webpack.config.js
index 17dc2d39e34..68b850b3773 100644
--- a/extensions/css-language-features/server/extension.webpack.config.js
+++ b/extensions/css-language-features/server/extension.webpack.config.js
@@ -9,7 +9,6 @@
const withDefaults = require('../../shared.webpack.config');
const path = require('path');
-var webpack = require('webpack');
module.exports = withDefaults({
context: path.join(__dirname),
@@ -19,12 +18,5 @@ module.exports = withDefaults({
output: {
filename: 'cssServerMain.js',
path: path.join(__dirname, 'dist')
- },
- plugins: [
- new webpack.NormalModuleReplacementPlugin(
- /[/\\]vscode-languageserver[/\\]lib[/\\]files\.js/,
- require.resolve('./build/filesFillIn')
- ),
- new webpack.IgnorePlugin(/vertx/)
- ],
+ }
});
diff --git a/extensions/css-language-features/server/package.json b/extensions/css-language-features/server/package.json
index 28f60c966d7..e3fd51ae5ec 100644
--- a/extensions/css-language-features/server/package.json
+++ b/extensions/css-language-features/server/package.json
@@ -9,12 +9,12 @@
},
"main": "./out/cssServerMain",
"dependencies": {
- "vscode-css-languageservice": "^3.0.13-next.3",
- "vscode-languageserver": "^5.1.0"
+ "vscode-css-languageservice": "^4.0.2-next.3",
+ "vscode-languageserver": "^5.3.0-next.2"
},
"devDependencies": {
"@types/mocha": "2.2.33",
- "@types/node": "^8.10.25",
+ "@types/node": "^10.12.21",
"glob": "^7.1.2",
"mocha": "^5.2.0",
"mocha-junit-reporter": "^1.17.0",
diff --git a/extensions/css-language-features/server/src/cssServerMain.ts b/extensions/css-language-features/server/src/cssServerMain.ts
index bc656844208..e1c78b158c1 100644
--- a/extensions/css-language-features/server/src/cssServerMain.ts
+++ b/extensions/css-language-features/server/src/cssServerMain.ts
@@ -7,13 +7,14 @@ import {
createConnection, IConnection, TextDocuments, InitializeParams, InitializeResult, ServerCapabilities, ConfigurationRequest, WorkspaceFolder
} from 'vscode-languageserver';
import URI from 'vscode-uri';
-import { TextDocument, CompletionList } from 'vscode-languageserver-types';
+import { TextDocument, CompletionList, Position } from 'vscode-languageserver-types';
import { getCSSLanguageService, getSCSSLanguageService, getLESSLanguageService, LanguageSettings, LanguageService, Stylesheet } from 'vscode-css-languageservice';
import { getLanguageModelCache } from './languageModelCache';
import { getPathCompletionParticipant } from './pathCompletion';
import { formatError, runSafe } from './utils/runner';
import { getDocumentContext } from './utils/documentContext';
+import { getDataProviders } from './customData';
export interface Settings {
css: LanguageSettings;
@@ -50,6 +51,8 @@ let scopedSettingsSupport = false;
let foldingRangeLimit = Number.MAX_VALUE;
let workspaceFolders: WorkspaceFolder[];
+const languageServices: { [id: string]: LanguageService } = {};
+
// After the server has started the client sends an initialize request. The server receives
// in the passed params the rootPath of the workspace plus the client capabilities.
connection.onInitialize((params: InitializeParams): InitializeResult => {
@@ -61,6 +64,9 @@ connection.onInitialize((params: InitializeParams): InitializeResult => {
}
}
+ const dataPaths: string[] = params.initializationOptions.dataPaths;
+ const customDataProviders = getDataProviders(dataPaths);
+
function getClientCapability(name: string, def: T) {
const keys = name.split('.');
let c: any = params.capabilities;
@@ -76,6 +82,10 @@ connection.onInitialize((params: InitializeParams): InitializeResult => {
scopedSettingsSupport = !!getClientCapability('workspace.configuration', false);
foldingRangeLimit = getClientCapability('textDocument.foldingRange.rangeLimit', Number.MAX_VALUE);
+ languageServices.css = getCSSLanguageService({ customDataProviders });
+ languageServices.scss = getSCSSLanguageService({ customDataProviders });
+ languageServices.less = getLESSLanguageService({ customDataProviders });
+
const capabilities: ServerCapabilities = {
// Tell the client that the server works in FULL text document sync mode
textDocumentSync: documents.syncKind,
@@ -96,12 +106,6 @@ connection.onInitialize((params: InitializeParams): InitializeResult => {
return { capabilities };
});
-const languageServices: { [id: string]: LanguageService } = {
- css: getCSSLanguageService(),
- scss: getSCSSLanguageService(),
- less: getLESSLanguageService()
-};
-
function getLanguageService(document: TextDocument) {
let service = languageServices[document.languageId];
if (!service) {
@@ -126,7 +130,7 @@ function getDocumentSettings(textDocument: TextDocument): Thenable {
}, null, `Error while computing folding ranges for ${params.textDocument.uri}`, token);
});
+connection.onRequest('$/textDocument/selectionRanges', async (params, token) => {
+ return runSafe(() => {
+ const document = documents.get(params.textDocument.uri);
+ const positions: Position[] = params.positions;
+
+ if (document) {
+ const stylesheet = stylesheets.get(document);
+ return getLanguageService(document).getSelectionRanges(document, positions, stylesheet);
+ }
+ return Promise.resolve(null);
+ }, null, `Error while computing selection ranges for ${params.textDocument.uri}`, token);
+});
+
+
// Listen on the connection
connection.listen();
\ No newline at end of file
diff --git a/extensions/css-language-features/server/src/customData.ts b/extensions/css-language-features/server/src/customData.ts
new file mode 100644
index 00000000000..f173d884a2b
--- /dev/null
+++ b/extensions/css-language-features/server/src/customData.ts
@@ -0,0 +1,50 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import { CSSDataV1, ICSSDataProvider } from 'vscode-css-languageservice';
+import * as fs from 'fs';
+
+export function getDataProviders(dataPaths: string[]): ICSSDataProvider[] {
+ const providers = dataPaths.map(p => {
+ if (fs.existsSync(p)) {
+ const data = parseCSSData(fs.readFileSync(p, 'utf-8'));
+ return {
+ provideProperties: () => data.properties || [],
+ provideAtDirectives: () => data.atDirectives || [],
+ providePseudoClasses: () => data.pseudoClasses || [],
+ providePseudoElements: () => data.pseudoElements || []
+ };
+ } else {
+ return {
+ provideProperties: () => [],
+ provideAtDirectives: () => [],
+ providePseudoClasses: () => [],
+ providePseudoElements: () => []
+ };
+ }
+ });
+
+ return providers;
+}
+
+function parseCSSData(source: string): CSSDataV1 {
+ let rawData: any;
+
+ try {
+ rawData = JSON.parse(source);
+ } catch (err) {
+ return {
+ version: 1
+ };
+ }
+
+ return {
+ version: 1,
+ properties: rawData.properties || [],
+ atDirectives: rawData.atDirectives || [],
+ pseudoClasses: rawData.pseudoClasses || [],
+ pseudoElements: rawData.pseudoElements || []
+ };
+}
diff --git a/extensions/css-language-features/server/src/languageModelCache.ts b/extensions/css-language-features/server/src/languageModelCache.ts
index 7ce4adca9d4..561de4a9a7a 100644
--- a/extensions/css-language-features/server/src/languageModelCache.ts
+++ b/extensions/css-language-features/server/src/languageModelCache.ts
@@ -15,7 +15,7 @@ export function getLanguageModelCache(maxEntries: number, cleanupIntervalTime
let languageModels: { [uri: string]: { version: number, languageId: string, cTime: number, languageModel: T } } = {};
let nModels = 0;
- let cleanupInterval: NodeJS.Timer | undefined = void 0;
+ let cleanupInterval: NodeJS.Timer | undefined = undefined;
if (cleanupIntervalTimeInSec > 0) {
cleanupInterval = setInterval(() => {
let cutoffTime = Date.now() - cleanupIntervalTimeInSec * 1000;
@@ -73,7 +73,7 @@ export function getLanguageModelCache(maxEntries: number, cleanupIntervalTime
dispose() {
if (typeof cleanupInterval !== 'undefined') {
clearInterval(cleanupInterval);
- cleanupInterval = void 0;
+ cleanupInterval = undefined;
languageModels = {};
nModels = 0;
}
diff --git a/extensions/css-language-features/server/src/pathCompletion.ts b/extensions/css-language-features/server/src/pathCompletion.ts
index 28fb9ab24bb..4d988a52da9 100644
--- a/extensions/css-language-features/server/src/pathCompletion.ts
+++ b/extensions/css-language-features/server/src/pathCompletion.ts
@@ -195,9 +195,9 @@ function escapePath(p: string) {
}
function resolveWorkspaceRoot(activeDoc: TextDocument, workspaceFolders: WorkspaceFolder[]): string | undefined {
- for (let i = 0; i < workspaceFolders.length; i++) {
- if (startsWith(activeDoc.uri, workspaceFolders[i].uri)) {
- return path.resolve(URI.parse(workspaceFolders[i].uri).fsPath);
+ for (const folder of workspaceFolders) {
+ if (startsWith(activeDoc.uri, folder.uri)) {
+ return path.resolve(URI.parse(folder.uri).fsPath);
}
}
return undefined;
diff --git a/extensions/css-language-features/server/src/utils/documentContext.ts b/extensions/css-language-features/server/src/utils/documentContext.ts
index 21030e801b4..9858ca84367 100644
--- a/extensions/css-language-features/server/src/utils/documentContext.ts
+++ b/extensions/css-language-features/server/src/utils/documentContext.ts
@@ -19,7 +19,7 @@ export function getDocumentContext(documentUri: string, workspaceFolders: Worksp
return folderURI;
}
}
- return void 0;
+ return undefined;
}
return {
diff --git a/extensions/css-language-features/server/yarn.lock b/extensions/css-language-features/server/yarn.lock
index 30c2fb6c62f..dbe0fa51fd9 100644
--- a/extensions/css-language-features/server/yarn.lock
+++ b/extensions/css-language-features/server/yarn.lock
@@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.33.tgz#d79a0061ec270379f4d9e225f4096fb436669def"
integrity sha1-15oAYewnA3n02eIl9AlvtDZmne8=
-"@types/node@^8.10.25":
- version "8.10.25"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.25.tgz#801fe4e39372cef18f268db880a5fbfcf71adc7e"
- integrity sha512-WXvAXaknB0c2cJ7N44e1kUrVu5K90mSfPPaT5XxfuSMxEWva86EYIwxUZM3jNZ2P1CIC9e2z4WJqpAF69PQxeA==
+"@types/node@^10.12.21":
+ version "10.12.21"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
+ integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
ansi-regex@^3.0.0:
version "3.0.0"
@@ -229,12 +229,12 @@ supports-color@5.4.0:
dependencies:
has-flag "^3.0.0"
-vscode-css-languageservice@^3.0.13-next.3:
- version "3.0.13-next.3"
- resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-3.0.13-next.3.tgz#b9e6f253cace52fbb749d2fe194ae4b196f3543e"
- integrity sha512-7+7JddZRt8zFRLbqygxJw+GHtbQ5o2YvgEFvi4ixvbUAX6KlY3Yw6CgUUbg9dmBla7h+GbtoDjwiLFV6Oy+SBQ==
+vscode-css-languageservice@^4.0.2-next.3:
+ version "4.0.2-next.3"
+ resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.0.2-next.3.tgz#f81925d6037f05724d1c1fe00e8fb7fcbece72ff"
+ integrity sha512-Th6ESBGTdNo4CbZEeKNVBKi4DwGjafS1+05kuoH3hO5mFCKr6ttdvu4GxMHca7nGN1efv5tiZ6slO8PCN1bLNA==
dependencies:
- vscode-languageserver-types "^3.13.0"
+ vscode-languageserver-types "^3.14.0"
vscode-nls "^4.0.0"
vscode-jsonrpc@^4.0.0:
@@ -242,25 +242,25 @@ vscode-jsonrpc@^4.0.0:
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz#a7bf74ef3254d0a0c272fab15c82128e378b3be9"
integrity sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg==
-vscode-languageserver-protocol@3.13.0:
- version "3.13.0"
- resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.13.0.tgz#710d8e42119bb3affb1416e1e104bd6b4d503595"
- integrity sha512-2ZGKwI+P2ovQll2PGAp+2UfJH+FK9eait86VBUdkPd9HRlm8e58aYT9pV/NYanHOcp3pL6x2yTLVCFMcTer0mg==
+vscode-languageserver-protocol@3.15.0-next.1:
+ version "3.15.0-next.1"
+ resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.0-next.1.tgz#1e45e224d7eef8c79b4bed75b9dcb1930d2ab8ed"
+ integrity sha512-LXF0d9s3vxFBxVQ4aKl/XghdEMAncGt3dh4urIYa9Is43g3MfIQL9fC44YZtP+XXOrI2rpZU8lRNN01U1V6CDg==
dependencies:
vscode-jsonrpc "^4.0.0"
- vscode-languageserver-types "3.13.0"
+ vscode-languageserver-types "3.14.0"
-vscode-languageserver-types@3.13.0, vscode-languageserver-types@^3.13.0:
- version "3.13.0"
- resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.13.0.tgz#b704b024cef059f7b326611c99b9c8753c0a18b4"
- integrity sha512-BnJIxS+5+8UWiNKCP7W3g9FlE7fErFw0ofP5BXJe7c2tl0VeWh+nNHFbwAS2vmVC4a5kYxHBjRy0UeOtziemVA==
+vscode-languageserver-types@3.14.0, vscode-languageserver-types@^3.14.0:
+ version "3.14.0"
+ resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz#d3b5952246d30e5241592b6dde8280e03942e743"
+ integrity sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A==
-vscode-languageserver@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-5.1.0.tgz#012a28f154cc7a848c443d217894942e4c3eeb39"
- integrity sha512-CIsrgx2Y5VHS317g/HwkSTWYBIQmy0DwEyZPmB2pEpVOhYFwVsYpbiJwHIIyLQsQtmRaO4eA2xM8KPjNSdXpBw==
+vscode-languageserver@^5.3.0-next.2:
+ version "5.3.0-next.2"
+ resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-5.3.0-next.2.tgz#31ce4c34d68b517b400ca9e211e43f8d868b8dcc"
+ integrity sha512-n5onRw9naMrRHp2jnOn+ZwN1n+tTfzftWLPonjp1FWf/iCZWIlnw2TyF/Hn+SDGhLoVtoghmxhwEQaxEAfLHvw==
dependencies:
- vscode-languageserver-protocol "3.13.0"
+ vscode-languageserver-protocol "3.15.0-next.1"
vscode-uri "^1.0.6"
vscode-nls@^4.0.0:
diff --git a/extensions/css-language-features/yarn.lock b/extensions/css-language-features/yarn.lock
index d626f86f433..385d59738dd 100644
--- a/extensions/css-language-features/yarn.lock
+++ b/extensions/css-language-features/yarn.lock
@@ -2,10 +2,10 @@
# yarn lockfile v1
-"@types/node@^8.10.25":
- version "8.10.25"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.25.tgz#801fe4e39372cef18f268db880a5fbfcf71adc7e"
- integrity sha512-WXvAXaknB0c2cJ7N44e1kUrVu5K90mSfPPaT5XxfuSMxEWva86EYIwxUZM3jNZ2P1CIC9e2z4WJqpAF69PQxeA==
+"@types/node@^10.12.21":
+ version "10.12.21"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
+ integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
balanced-match@^1.0.0:
version "1.0.0"
@@ -167,26 +167,26 @@ vscode-jsonrpc@^4.0.0:
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz#a7bf74ef3254d0a0c272fab15c82128e378b3be9"
integrity sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg==
-vscode-languageclient@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-5.1.0.tgz#650ab0dc9fd0daaade058a8471aaff5bc3f9580e"
- integrity sha512-Z95Kps8UqD4o17HE3uCkZuvenOsxHVH46dKmaGVpGixEFZigPaVuVxLM/JWeIY9aRenoC0ZD9CK1O7L4jpffKg==
+vscode-languageclient@^5.2.1:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-5.2.1.tgz#7cfc83a294c409f58cfa2b910a8cfeaad0397193"
+ integrity sha512-7jrS/9WnV0ruqPamN1nE7qCxn0phkH5LjSgSp9h6qoJGoeAKzwKz/PF6M+iGA/aklx4GLZg1prddhEPQtuXI1Q==
dependencies:
semver "^5.5.0"
- vscode-languageserver-protocol "3.13.0"
+ vscode-languageserver-protocol "3.14.1"
-vscode-languageserver-protocol@3.13.0:
- version "3.13.0"
- resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.13.0.tgz#710d8e42119bb3affb1416e1e104bd6b4d503595"
- integrity sha512-2ZGKwI+P2ovQll2PGAp+2UfJH+FK9eait86VBUdkPd9HRlm8e58aYT9pV/NYanHOcp3pL6x2yTLVCFMcTer0mg==
+vscode-languageserver-protocol@3.14.1:
+ version "3.14.1"
+ resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.14.1.tgz#b8aab6afae2849c84a8983d39a1cf742417afe2f"
+ integrity sha512-IL66BLb2g20uIKog5Y2dQ0IiigW0XKrvmWiOvc0yXw80z3tMEzEnHjaGAb3ENuU7MnQqgnYJ1Cl2l9RvNgDi4g==
dependencies:
vscode-jsonrpc "^4.0.0"
- vscode-languageserver-types "3.13.0"
+ vscode-languageserver-types "3.14.0"
-vscode-languageserver-types@3.13.0:
- version "3.13.0"
- resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.13.0.tgz#b704b024cef059f7b326611c99b9c8753c0a18b4"
- integrity sha512-BnJIxS+5+8UWiNKCP7W3g9FlE7fErFw0ofP5BXJe7c2tl0VeWh+nNHFbwAS2vmVC4a5kYxHBjRy0UeOtziemVA==
+vscode-languageserver-types@3.14.0:
+ version "3.14.0"
+ resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz#d3b5952246d30e5241592b6dde8280e03942e743"
+ integrity sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A==
vscode-nls@^4.0.0:
version "4.0.0"
diff --git a/extensions/css/cgmanifest.json b/extensions/css/cgmanifest.json
index a4d5abc868c..7b7a8d5e8e8 100644
--- a/extensions/css/cgmanifest.json
+++ b/extensions/css/cgmanifest.json
@@ -4,15 +4,15 @@
"component": {
"type": "git",
"git": {
- "name": "atom/language-css",
- "repositoryUrl": "https://github.com/atom/language-css",
- "commitHash": "7e06c88b89218fe6e8eba77fb674152f1cea0b10"
+ "name": "octref/language-css",
+ "repositoryUrl": "https://github.com/octref/language-css",
+ "commitHash": "6d3a2d01dd67ef062030f4520dd42a5424330a3b"
}
},
"license": "MIT",
- "description": "The file syntaxes/css.tmLanguage.json was derived from the Atom package https://github.com/atom/language-css which was originally converted from the TextMate bundle https://github.com/textmate/css.tmbundle.",
- "version": "0.0.0"
+ "description": "The file syntaxes/css.tmLanguage.json was derived from https://github.com/octref/language-css which was derived from the Atom package https://github.com/atom/language-css which was originally converted from the TextMate bundle https://github.com/textmate/css.tmbundle.",
+ "version": "0.42.11"
}
],
"version": 1
-}
+}
\ No newline at end of file
diff --git a/extensions/css/syntaxes/css.tmLanguage.json b/extensions/css/syntaxes/css.tmLanguage.json
index 488c8f12c30..a45463c8b9b 100644
--- a/extensions/css/syntaxes/css.tmLanguage.json
+++ b/extensions/css/syntaxes/css.tmLanguage.json
@@ -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/octref/language-css/commit/7e06c88b89218fe6e8eba77fb674152f1cea0b10",
+ "version": "https://github.com/octref/language-css/commit/6d3a2d01dd67ef062030f4520dd42a5424330a3b",
"name": "CSS",
"scopeName": "source.css",
"patterns": [
@@ -1397,7 +1397,7 @@
"property-names": {
"patterns": [
{
- "match": "(?xi) (?();
+
+ private hasFired = false;
+ private shellPid?: number;
+ private regexp: RegExp;
+ private disposables: vscode.Disposable[] = [];
+
+ static start(session: vscode.DebugSession): ServerReadyDetector | undefined {
+ if (session.configuration.serverReadyAction) {
+ let detector = ServerReadyDetector.detectors.get(session);
+ if (!detector) {
+ detector = new ServerReadyDetector(session);
+ ServerReadyDetector.detectors.set(session, detector);
+ }
+ return detector;
+ }
+ return undefined;
+ }
+
+ static stop(session: vscode.DebugSession): void {
+ let detector = ServerReadyDetector.detectors.get(session);
+ if (detector) {
+ ServerReadyDetector.detectors.delete(session);
+ detector.dispose();
+ }
+ }
+
+ static rememberShellPid(session: vscode.DebugSession, pid: number) {
+ let detector = ServerReadyDetector.detectors.get(session);
+ if (detector) {
+ detector.shellPid = pid;
+ }
+ }
+
+ private constructor(private session: vscode.DebugSession) {
+ super(() => this.internalDispose());
+
+ this.regexp = new RegExp(session.configuration.serverReadyAction.pattern || PATTERN, 'i');
+ }
+
+ private internalDispose() {
+ this.disposables.forEach(d => d.dispose());
+ this.disposables = [];
+ }
+
+ async trackTerminals() {
+
+ let terminals: vscode.Terminal[] = [];
+
+ // either find the terminal where the debug is started with "runInTerminal" or use all terminals
+ for (let terminal of vscode.window.terminals) {
+ if (!this.shellPid || await terminal.processId === this.shellPid) {
+ terminals.push(terminal);
+ }
+ }
+ this.shellPid = undefined;
+
+ terminals.forEach(terminal => {
+ this.disposables.push(terminal.onDidWriteData(s => {
+ this.detectPattern(s);
+ }));
+ });
+ }
+
+ detectPattern(s: string): void {
+
+ if (!this.hasFired) {
+ const matches = this.regexp.exec(s);
+ if (matches && matches.length >= 1) {
+ this.openExternalWithString(this.session, matches.length > 1 ? matches[1] : '');
+ this.hasFired = true;
+ this.internalDispose();
+ }
+ }
+ }
+
+ private openExternalWithString(session: vscode.DebugSession, captureString: string) {
+
+ const args: ServerReadyAction = session.configuration.serverReadyAction;
+ const format = args.uriFormat || URI_FORMAT;
+
+ if (captureString === '') {
+ // nothing captured by reg exp -> use the uriFormat as the target url without substitution
+ // verify that format does not contain '%s'
+ if (format.indexOf('%s') >= 0) {
+ const errMsg = localize('server.ready.nocapture.error', "Format uri ('{0}') uses a substitution placeholder but pattern did not capture anything.", format);
+ vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined);
+ return;
+ }
+ captureString = format;
+ } else if (/^[0-9]+$/.test(captureString)) {
+ // looks like a port number -> use the uriFormat and substitute a single "%s" with the port
+ // verify that format only contains a single '%s'
+ const s = format.split('%s');
+ if (s.length !== 2) {
+ const errMsg = localize('server.ready.placeholder.error', "Format uri ('{0}') must contain exactly one substitution placeholder.", format);
+ vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined);
+ return;
+ }
+ captureString = util.format(format, captureString);
+ } else {
+ // use the string as is
+ }
+
+ this.openExternalWithUri(session, captureString);
+ }
+
+ private openExternalWithUri(session: vscode.DebugSession, uri: string) {
+
+ const args: ServerReadyAction = session.configuration.serverReadyAction;
+ switch (args.action || 'openExternally') {
+ case 'openExternally':
+ vscode.env.openExternal(vscode.Uri.parse(uri));
+ break;
+ case 'debugWithChrome':
+
+ const chrome = vscode.extensions.getExtension('msjsdiag.debugger-for-chrome');
+ if (chrome) {
+ vscode.debug.startDebugging(session.workspaceFolder, {
+ type: 'chrome',
+ name: 'Chrome Debug',
+ request: 'launch',
+ url: uri,
+ webRoot: args.webRoot || WEB_ROOT
+ }, session);
+ } else {
+ const errMsg = localize('server.ready.chrome.not.installed', "The action 'debugWithChrome' requires the '{0}'", 'Debugger for Chrome');
+ vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined);
+ }
+ break;
+ default:
+ // not supported
+ break;
+ }
+ }
+}
+
+export function activate(context: vscode.ExtensionContext) {
+
+ context.subscriptions.push(vscode.debug.onDidChangeActiveDebugSession(session => {
+ if (session && session.configuration.serverReadyAction) {
+ const detector = ServerReadyDetector.start(session);
+ if (detector) {
+ detector.trackTerminals();
+ }
+ }
+ }));
+
+ context.subscriptions.push(vscode.debug.onDidTerminateDebugSession(session => {
+ ServerReadyDetector.stop(session);
+ }));
+
+ const trackers = new Set();
+
+ context.subscriptions.push(vscode.debug.registerDebugConfigurationProvider('*', {
+ resolveDebugConfiguration(_folder: vscode.WorkspaceFolder | undefined, debugConfiguration: vscode.DebugConfiguration) {
+ if (debugConfiguration.type && debugConfiguration.serverReadyAction) {
+ if (!trackers.has(debugConfiguration.type)) {
+ trackers.add(debugConfiguration.type);
+ startTrackerForType(context, debugConfiguration.type);
+ }
+ }
+ return debugConfiguration;
+ }
+ }));
+}
+
+function startTrackerForType(context: vscode.ExtensionContext, type: string) {
+
+ // scan debug console output for a PORT message
+ context.subscriptions.push(vscode.debug.registerDebugAdapterTrackerFactory(type, {
+ createDebugAdapterTracker(session: vscode.DebugSession) {
+ const detector = ServerReadyDetector.start(session);
+ if (detector) {
+ let runInTerminalRequestSeq: number | undefined;
+ return {
+ onDidSendMessage: m => {
+ if (m.type === 'event' && m.event === 'output' && m.body) {
+ switch (m.body.category) {
+ case 'console':
+ case 'stderr':
+ case 'stdout':
+ if (m.body.output) {
+ detector.detectPattern(m.body.output);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ if (m.type === 'request' && m.command === 'runInTerminal' && m.arguments) {
+ if (m.arguments.kind === 'integrated') {
+ runInTerminalRequestSeq = m.seq; // remember this to find matching response
+ }
+ }
+ },
+ onWillReceiveMessage: m => {
+ if (runInTerminalRequestSeq && m.type === 'response' && m.command === 'runInTerminal' && m.body && runInTerminalRequestSeq === m.request_seq) {
+ runInTerminalRequestSeq = undefined;
+ ServerReadyDetector.rememberShellPid(session, m.body.shellProcessId);
+ }
+ }
+ };
+ }
+ return undefined;
+ }
+ }));
+}
diff --git a/src/vs/workbench/parts/terminal/browser/terminalFindWidget.css b/extensions/debug-server-ready/src/typings/ref.d.ts
similarity index 69%
rename from src/vs/workbench/parts/terminal/browser/terminalFindWidget.css
rename to extensions/debug-server-ready/src/typings/ref.d.ts
index 93422f893ea..954bab971e3 100644
--- a/src/vs/workbench/parts/terminal/browser/terminalFindWidget.css
+++ b/extensions/debug-server-ready/src/typings/ref.d.ts
@@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-.monaco-workbench .simple-find-part .monaco-inputbox > .wrapper > .input {
- width: 100% !important;
- padding-right: 66px;
-}
\ No newline at end of file
+///
+///
+///
diff --git a/extensions/debug-server-ready/tsconfig.json b/extensions/debug-server-ready/tsconfig.json
new file mode 100644
index 00000000000..f9b780a0e1c
--- /dev/null
+++ b/extensions/debug-server-ready/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../shared.tsconfig.json",
+ "compilerOptions": {
+ "outDir": "./out",
+ "downlevelIteration": true
+ },
+ "include": [
+ "src/**/*"
+ ]
+}
\ No newline at end of file
diff --git a/extensions/debug-server-ready/yarn.lock b/extensions/debug-server-ready/yarn.lock
new file mode 100644
index 00000000000..6767cb8d8c2
--- /dev/null
+++ b/extensions/debug-server-ready/yarn.lock
@@ -0,0 +1,13 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@types/node@8.0.33":
+ version "8.0.33"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.33.tgz#1126e94374014e54478092830704f6ea89df04cd"
+ integrity sha512-vmCdO8Bm1ExT+FWfC9sd9r4jwqM7o97gGy2WBshkkXbf/2nLAJQUrZfIhw27yVOtLUev6kSZc4cav/46KbDd8A==
+
+vscode-nls@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002"
+ integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw==
diff --git a/extensions/docker/cgmanifest.json b/extensions/docker/cgmanifest.json
index 844d3120d3c..dbbf43607ee 100644
--- a/extensions/docker/cgmanifest.json
+++ b/extensions/docker/cgmanifest.json
@@ -15,4 +15,4 @@
}
],
"version": 1
-}
+}
\ No newline at end of file
diff --git a/extensions/emmet/package.json b/extensions/emmet/package.json
index 8733fbdb5c9..9805a694c83 100644
--- a/extensions/emmet/package.json
+++ b/extensions/emmet/package.json
@@ -434,7 +434,9 @@
}
},
"scripts": {
- "compile": "gulp compile-extension:emmet"
+ "watch": "gulp watch-extension:emmet",
+ "compile": "gulp compile-extension:emmet",
+ "deps": "yarn add vscode-emmet-helper"
},
"devDependencies": {
"@types/node": "8.0.33",
@@ -447,6 +449,6 @@
"@emmetio/html-matcher": "^0.3.3",
"@emmetio/math-expression": "^0.1.1",
"image-size": "^0.5.2",
- "vscode-emmet-helper": "^1.2.12"
+ "vscode-emmet-helper": "^1.2.15"
}
}
diff --git a/extensions/emmet/src/abbreviationActions.ts b/extensions/emmet/src/abbreviationActions.ts
index f6634d35c9c..f332aff2e00 100644
--- a/extensions/emmet/src/abbreviationActions.ts
+++ b/extensions/emmet/src/abbreviationActions.ts
@@ -7,8 +7,8 @@ import * as vscode from 'vscode';
import { Node, HtmlNode, Rule, Property, Stylesheet } from 'EmmetNode';
import { getEmmetHelper, getNode, getInnerRange, getMappingForIncludedLanguages, parseDocument, validate, getEmmetConfiguration, isStyleSheet, getEmmetMode, parsePartialStylesheet, isStyleAttribute, getEmbeddedCssNodeIfAny, allowedMimeTypesInScriptTag } from './util';
-const trimRegex = /[\u00a0]*[\d|#|\-|\*|\u2022]+\.?/;
-const hexColorRegex = /^#[\d,a-f,A-F]{0,6}$/;
+const trimRegex = /[\u00a0]*[\d#\-\*\u2022]+\.?/;
+const hexColorRegex = /^#[\da-fA-F]{0,6}$/;
const inlineElements = ['a', 'abbr', 'acronym', 'applet', 'b', 'basefont', 'bdo',
'big', 'br', 'button', 'cite', 'code', 'del', 'dfn', 'em', 'font', 'i',
'iframe', 'img', 'input', 'ins', 'kbd', 'label', 'map', 'object', 'q',
@@ -54,7 +54,11 @@ function doWrapping(individualLines: boolean, args: any) {
return;
}
}
- const syntax = 'html';
+ args = args || {};
+ if (!args['language']) {
+ args['language'] = editor.document.languageId;
+ }
+ const syntax = getSyntaxFromArgs(args) || 'html';
const rootNode = parseDocument(editor.document, false);
let inPreview = false;
@@ -105,9 +109,9 @@ function doWrapping(individualLines: boolean, args: any) {
function revertPreview(): Thenable {
return editor.edit(builder => {
- for (let i = 0; i < rangesToReplace.length; i++) {
- builder.replace(rangesToReplace[i].previewRange, rangesToReplace[i].originalContent);
- rangesToReplace[i].previewRange = rangesToReplace[i].originalRange;
+ for (const rangeToReplace of rangesToReplace) {
+ builder.replace(rangeToReplace.previewRange, rangeToReplace.originalContent);
+ rangeToReplace.previewRange = rangeToReplace.originalRange;
}
}, { undoStopBefore: false, undoStopAfter: false });
}
@@ -295,8 +299,8 @@ export function expandEmmetAbbreviation(args: any): Thenable {
- var posA = a.isReversed ? a.anchor : a.active;
- var posB = b.isReversed ? b.anchor : b.active;
+ const posA = a.isReversed ? a.anchor : a.active;
+ const posB = b.isReversed ? b.anchor : b.active;
return posA.compareTo(posB) * -1;
});
@@ -535,9 +539,7 @@ export function isValidLocationForEmmetAbbreviation(document: vscode.TextDocumen
/**
* Expands abbreviations as detailed in expandAbbrList in the editor
- * @param editor
- * @param expandAbbrList
- * @param insertSameSnippet
+ *
* @returns false if no snippet can be inserted.
*/
function expandAbbreviationInRange(editor: vscode.TextEditor, expandAbbrList: ExpandAbbreviationInput[], insertSameSnippet: boolean): Thenable {
diff --git a/extensions/emmet/src/extension.ts b/extensions/emmet/src/extension.ts
index fb7bcb22f0f..a5195af577c 100644
--- a/extensions/emmet/src/extension.ts
+++ b/extensions/emmet/src/extension.ts
@@ -98,7 +98,7 @@ export function activate(context: vscode.ExtensionContext) {
}));
context.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.incrementNumberByOneTenth', () => {
- return incrementDecrement(.1);
+ return incrementDecrement(0.1);
}));
context.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.incrementNumberByOne', () => {
diff --git a/extensions/emmet/src/reflectCssValue.ts b/extensions/emmet/src/reflectCssValue.ts
index 56f9fbc9840..da20b38397b 100644
--- a/extensions/emmet/src/reflectCssValue.ts
+++ b/extensions/emmet/src/reflectCssValue.ts
@@ -29,9 +29,9 @@ function updateCSSNode(editor: TextEditor, property: Property): Thenable {
new Selection(3, 17, 3, 17), // cursor inside the inner span element
new Selection(4, 5, 4, 5), // cursor inside opening tag
new Selection(5, 35, 5, 35), // cursor inside closing tag
- new Selection(7, 3, 7, 3), // cursor inside open tag of one of of whose children is already commented
+ new Selection(7, 3, 7, 3), // cursor inside open tag of one of whose children is already commented
new Selection(14, 8, 14, 8), // cursor inside the css property inside the style tag
new Selection(18, 3, 18, 3) // cursor inside the css rule inside the style tag
];
@@ -114,7 +114,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
editor.selections = [
new Selection(3, 7, 3, 25), // Hello<
new Selection(4, 3, 4, 30), // - There
- new Selection(7, 2, 10, 7), // The one of of whose children is already commented
+ new Selection(7, 2, 10, 7), // The one of whose children is already commented
new Selection(14, 4, 14, 17), // css property inside the style tag
new Selection(17, 3, 20, 4) // the css rule inside the style tag
];
@@ -192,7 +192,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
return withRandomFileEditor(contents, 'html', (editor, doc) => {
editor.selections = [
new Selection(3, 24, 4, 20),
- new Selection(7, 2, 9, 10) // The one of of whose children is already commented
+ new Selection(7, 2, 9, 10) // The one of whose children is already commented
];
return toggleComment().then(() => {
@@ -232,7 +232,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
new Selection(3, 17, 3, 17), // cursor inside the inner span element
new Selection(4, 5, 4, 5), // two cursors: one inside opening tag
new Selection(4, 17, 4, 17), // and the second inside the inner span element
- new Selection(7, 3, 7, 3), // two cursors: one inside open tag of one of of whose children is already commented
+ new Selection(7, 3, 7, 3), // two cursors: one inside open tag of one of whose children is already commented
new Selection(9, 10, 9, 10), // and the second inside inner li element, whose parent is selected
new Selection(12, 3, 12, 3), // four nested cursors: one inside the style open tag
new Selection(14, 8, 14, 8), // the second inside the css property inside the style tag
diff --git a/extensions/emmet/src/test/wrapWithAbbreviation.test.ts b/extensions/emmet/src/test/wrapWithAbbreviation.test.ts
index 9fc924508e2..d5a4a2bce3c 100644
--- a/extensions/emmet/src/test/wrapWithAbbreviation.test.ts
+++ b/extensions/emmet/src/test/wrapWithAbbreviation.test.ts
@@ -134,19 +134,7 @@ suite('Tests for Wrap with Abbreviations', () => {
`;
-
- return withRandomFileEditor(contents, 'html', (editor, _) => {
- editor.selections = [new Selection(2, 0, 2, 0)];
- const promise = wrapWithAbbreviation({ abbreviation: 'li.hello|c' });
- if (!promise) {
- assert.equal(1, 2, 'Wrap returned undefined instead of promise.');
- return Promise.resolve();
- }
- return promise.then(() => {
- assert.equal(editor.document.getText(), expectedContents);
- return Promise.resolve();
- });
- });
+ return testWrapWithAbbreviation([new Selection(2, 0, 2, 0)], 'li.hello|c', expectedContents, contents);
});
test('Wrap with abbreviation entire node when cursor is on opening tag', () => {
@@ -162,19 +150,7 @@ suite('Tests for Wrap with Abbreviations', () => {
`;
-
- return withRandomFileEditor(contents, 'html', (editor, _) => {
- editor.selections = [new Selection(1, 1, 1, 1)];
- const promise = wrapWithAbbreviation({ abbreviation: 'div' });
- if (!promise) {
- assert.equal(1, 2, 'Wrap returned undefined instead of promise.');
- return Promise.resolve();
- }
- return promise.then(() => {
- assert.equal(editor.document.getText(), expectedContents);
- return Promise.resolve();
- });
- });
+ return testWrapWithAbbreviation([new Selection(1, 1, 1, 1)], 'div', expectedContents, contents);
});
test('Wrap with abbreviation entire node when cursor is on closing tag', () => {
@@ -190,19 +166,7 @@ suite('Tests for Wrap with Abbreviations', () => {
`;
-
- return withRandomFileEditor(contents, 'html', (editor, _) => {
- editor.selections = [new Selection(3, 1, 3, 1)];
- const promise = wrapWithAbbreviation({ abbreviation: 'div' });
- if (!promise) {
- assert.equal(1, 2, 'Wrap returned undefined instead of promise.');
- return Promise.resolve();
- }
- return promise.then(() => {
- assert.equal(editor.document.getText(), expectedContents);
- return Promise.resolve();
- });
- });
+ return testWrapWithAbbreviation([new Selection(3, 1, 3, 1)], 'div', expectedContents, contents);
});
test('Wrap with multiline abbreviation doesnt add extra spaces', () => {
@@ -215,19 +179,7 @@ suite('Tests for Wrap with Abbreviations', () => {
- hello
`;
-
- return withRandomFileEditor(contents, 'html', (editor, _) => {
- editor.selections = [new Selection(1, 2, 1, 2)];
- const promise = wrapWithAbbreviation({ abbreviation: 'ul>li>a' });
- if (!promise) {
- assert.equal(1, 2, 'Wrap returned undefined instead of promise.');
- return Promise.resolve();
- }
- return promise.then(() => {
- assert.equal(editor.document.getText(), expectedContents);
- return Promise.resolve();
- });
- });
+ return testWrapWithAbbreviation([new Selection(1, 2, 1, 2)], 'ul>li>a', expectedContents, contents);
});
test('Wrap individual lines with abbreviation', () => {
@@ -245,18 +197,7 @@ suite('Tests for Wrap with Abbreviations', () => {
`;
- return withRandomFileEditor(contents, 'html', (editor, _) => {
- editor.selections = [new Selection(2, 2, 3, 33)];
- const promise = wrapIndividualLinesWithAbbreviation({ abbreviation: 'ul>li.hello$*' });
- if (!promise) {
- assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned undefined.');
- return Promise.resolve();
- }
- return promise.then(() => {
- assert.equal(editor.document.getText(), wrapIndividualLinesExpected);
- return Promise.resolve();
- });
- });
+ return testWrapIndividualLinesWithAbbreviation([new Selection(2, 2, 3, 33)], 'ul>li.hello$*', wrapIndividualLinesExpected, contents);
});
test('Wrap individual lines with abbreviation with extra space selected', () => {
@@ -274,18 +215,7 @@ suite('Tests for Wrap with Abbreviations', () => {
`;
- return withRandomFileEditor(contents, 'html', (editor, _) => {
- editor.selections = [new Selection(2, 1, 4, 0)];
- const promise = wrapIndividualLinesWithAbbreviation({ abbreviation: 'ul>li.hello$*' });
- if (!promise) {
- assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned undefined.');
- return Promise.resolve();
- }
- return promise.then(() => {
- assert.equal(editor.document.getText(), wrapIndividualLinesExpected);
- return Promise.resolve();
- });
- });
+ return testWrapIndividualLinesWithAbbreviation([new Selection(2, 1, 4, 0)], 'ul>li.hello$*', wrapIndividualLinesExpected, contents);
});
test('Wrap individual lines with abbreviation with comment filter', () => {
@@ -305,18 +235,7 @@ suite('Tests for Wrap with Abbreviations', () => {
`;
- return withRandomFileEditor(contents, 'html', (editor, _) => {
- editor.selections = [new Selection(2, 2, 3, 33)];
- const promise = wrapIndividualLinesWithAbbreviation({ abbreviation: 'ul>li.hello*|c' });
- if (!promise) {
- assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned undefined.');
- return Promise.resolve();
- }
- return promise.then(() => {
- assert.equal(editor.document.getText(), wrapIndividualLinesExpected);
- return Promise.resolve();
- });
- });
+ return testWrapIndividualLinesWithAbbreviation([new Selection(2, 2, 3, 33)], 'ul>li.hello*|c', wrapIndividualLinesExpected, contents);
});
test('Wrap individual lines with abbreviation and trim', () => {
@@ -334,19 +253,7 @@ suite('Tests for Wrap with Abbreviations', () => {
`;
- return withRandomFileEditor(contents, 'html', (editor, _) => {
- editor.selections = [new Selection(2, 3, 3, 16)];
- const promise = wrapIndividualLinesWithAbbreviation({ abbreviation: 'ul>li.hello$*|t' });
- if (!promise) {
- assert.equal(1, 2, 'Wrap Individual Lines with Abbreviation returned undefined.');
- return Promise.resolve();
- }
-
- return promise.then(() => {
- assert.equal(editor.document.getText(), wrapIndividualLinesExpected);
- return Promise.resolve();
- });
- });
+ return testWrapIndividualLinesWithAbbreviation([new Selection(2, 3, 3, 16)], 'ul>li.hello$*|t', wrapIndividualLinesExpected, contents);
});
test('Wrap with abbreviation and format set to false', () => {
@@ -384,11 +291,35 @@ suite('Tests for Wrap with Abbreviations', () => {
return testWrapWithAbbreviation([new Selection(2, 4, 3, 9), new Selection(5, 4, 6, 9)], 'div', wrapMultiLineExpected, htmlContentsForWrapMultiLineTests);
});
+
+ test('Wrap multiline with abbreviation uses className for jsx files', () => {
+ const wrapMultiLineJsxExpected = `
+
+`;
+
+ return testWrapWithAbbreviation([new Selection(2,2,3,33)], '.hello', wrapMultiLineJsxExpected, htmlContentsForWrapTests, 'jsx');
+ });
+
+ test('Wrap individual line with abbreviation uses className for jsx files', () => {
+ const wrapIndividualLinesJsxExpected = `
+
+`;
+
+ return testWrapIndividualLinesWithAbbreviation([new Selection(2,2,3,33)], '.hello$*', wrapIndividualLinesJsxExpected, htmlContentsForWrapTests, 'jsx');
+ });
});
-function testWrapWithAbbreviation(selections: Selection[], abbreviation: string, expectedContents: string, input: string = htmlContentsForWrapTests): Thenable {
- return withRandomFileEditor(input, 'html', (editor, _) => {
+function testWrapWithAbbreviation(selections: Selection[], abbreviation: string, expectedContents: string, input: string = htmlContentsForWrapTests, fileExtension: string = 'html'): Thenable {
+ return withRandomFileEditor(input, fileExtension, (editor, _) => {
editor.selections = selections;
const promise = wrapWithAbbreviation({ abbreviation });
if (!promise) {
@@ -402,3 +333,19 @@ function testWrapWithAbbreviation(selections: Selection[], abbreviation: string,
});
});
}
+
+function testWrapIndividualLinesWithAbbreviation(selections: Selection[], abbreviation: string, expectedContents: string, input: string = htmlContentsForWrapTests, fileExtension: string = 'html'): Thenable {
+ return withRandomFileEditor(input, fileExtension, (editor, _) => {
+ editor.selections = selections;
+ const promise = wrapIndividualLinesWithAbbreviation({ abbreviation });
+ if (!promise) {
+ assert.equal(1, 2, 'Wrap individual lines with Abbreviation returned undefined.');
+ return Promise.resolve();
+ }
+
+ return promise.then(() => {
+ assert.equal(editor.document.getText(), expectedContents);
+ return Promise.resolve();
+ });
+ });
+}
diff --git a/extensions/emmet/src/toggleComment.ts b/extensions/emmet/src/toggleComment.ts
index fa8cdc5e68c..952126fca5e 100644
--- a/extensions/emmet/src/toggleComment.ts
+++ b/extensions/emmet/src/toggleComment.ts
@@ -39,8 +39,7 @@ export function toggleComment(): Thenable | undefined {
return result === 0 ? arr1[0].range.start.character - arr2[0].range.start.character : result;
});
let lastEditPosition = new vscode.Position(0, 0);
- for (let i = 0; i < allEdits.length; i++) {
- const edits = allEdits[i];
+ for (const edits of allEdits) {
if (edits[0].range.end.isAfterOrEqual(lastEditPosition)) {
edits.forEach(x => {
editBuilder.replace(x.range, x.newText);
@@ -151,8 +150,8 @@ function toggleCommentStylesheet(selection: vscode.Selection, rootNode: Styleshe
}
function adjustStartNodeCss(node: Node | null, pos: vscode.Position, rootNode: Stylesheet): vscode.Position {
- for (let i = 0; i < rootNode.comments.length; i++) {
- let commentRange = new vscode.Range(rootNode.comments[i].start, rootNode.comments[i].end);
+ for (const comment of rootNode.comments) {
+ let commentRange = new vscode.Range(comment.start, comment.end);
if (commentRange.contains(pos)) {
return pos;
}
@@ -184,8 +183,8 @@ function adjustStartNodeCss(node: Node | null, pos: vscode.Position, rootNode: S
}
function adjustEndNodeCss(node: Node | null, pos: vscode.Position, rootNode: Stylesheet): vscode.Position {
- for (let i = 0; i < rootNode.comments.length; i++) {
- let commentRange = new vscode.Range(rootNode.comments[i].start, rootNode.comments[i].end);
+ for (const comment of rootNode.comments) {
+ let commentRange = new vscode.Range(comment.start, comment.end);
if (commentRange.contains(pos)) {
return pos;
}
diff --git a/extensions/emmet/src/util.ts b/extensions/emmet/src/util.ts
index 6e2531c001a..c90ff7f5c25 100644
--- a/extensions/emmet/src/util.ts
+++ b/extensions/emmet/src/util.ts
@@ -96,11 +96,10 @@ export function getMappingForIncludedLanguages(): any {
/**
* Get the corresponding emmet mode for given vscode language mode
* Eg: jsx for typescriptreact/javascriptreact or pug for jade
-* If the language is not supported by emmet or has been exlcuded via `exlcudeLanguages` setting,
+* If the language is not supported by emmet or has been excluded via `excludeLanguages` setting,
* then nothing is returned
*
-* @param language
-* @param exlcudedLanguages Array of language ids that user has chosen to exlcude for emmet
+* @param excludedLanguages Array of language ids that user has chosen to exclude for emmet
*/
export function getEmmetMode(language: string, excludedLanguages: string[]): string | undefined {
if (!language || excludedLanguages.indexOf(language) > -1) {
@@ -353,7 +352,6 @@ export function getHtmlNode(document: vscode.TextDocument, root: Node | undefine
/**
* Returns inner range of an html node.
- * @param currentNode
*/
export function getInnerRange(currentNode: HtmlNode): vscode.Range | undefined {
if (!currentNode.close) {
@@ -364,7 +362,6 @@ export function getInnerRange(currentNode: HtmlNode): vscode.Range | undefined {
/**
* Returns the deepest non comment node under given node
- * @param node
*/
export function getDeepestNode(node: Node | undefined): Node | undefined {
if (!node || !node.children || node.children.length === 0 || !node.children.find(x => x.type !== 'comment')) {
diff --git a/extensions/emmet/yarn.lock b/extensions/emmet/yarn.lock
index 22f16e39770..1fb4a9aff41 100644
--- a/extensions/emmet/yarn.lock
+++ b/extensions/emmet/yarn.lock
@@ -2469,10 +2469,10 @@ vinyl@~2.0.1:
remove-trailing-separator "^1.0.1"
replace-ext "^1.0.0"
-vscode-emmet-helper@^1.2.12:
- version "1.2.12"
- resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.2.12.tgz#6a75d5a74af735db179c708a9a91feb191f3edb5"
- integrity sha512-pCo+BNgP3lGuzTIGP1IMOGILpNGVopiAu02FrDC4ctEQQ5vFIaMtI4HxDGAw2Zu7pqGEHn6Z1KFmOb2Hd/xkHA==
+vscode-emmet-helper@^1.2.15:
+ version "1.2.15"
+ resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.2.15.tgz#62dbfbf49bb9ebe329cb7bffdda5aaac725eea7a"
+ integrity sha512-JplvmMMWSvm/6/dZezix2ADPM49u6YahPYjs/QToohUpomW/2Eb27ecCrkCyOGBPfKLKGiOPHCssss8TSDA9ag==
dependencies:
"@emmetio/extract-abbreviation" "0.1.6"
jsonc-parser "^1.0.0"
diff --git a/extensions/extension-editing/package.json b/extensions/extension-editing/package.json
index 0caec7607a6..52159b965bb 100644
--- a/extensions/extension-editing/package.json
+++ b/extensions/extension-editing/package.json
@@ -41,10 +41,18 @@
"fileMatch": "*color-theme.json",
"url": "vscode://schemas/color-theme"
}
+ ],
+ "languages": [
+ {
+ "id": "ignore",
+ "filenames": [
+ ".vscodeignore"
+ ]
+ }
]
},
"devDependencies": {
"@types/markdown-it": "0.0.2",
- "@types/node": "^8.10.25"
+ "@types/node": "^10.12.21"
}
}
diff --git a/extensions/extension-editing/yarn.lock b/extensions/extension-editing/yarn.lock
index d82f7c212a0..720c84f0656 100644
--- a/extensions/extension-editing/yarn.lock
+++ b/extensions/extension-editing/yarn.lock
@@ -7,16 +7,16 @@
resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.2.tgz#5d9ad19e6e6508cdd2f2596df86fd0aade598660"
integrity sha1-XZrRnm5lCM3S8llt+G/Qqt5ZhmA=
+"@types/node@^10.12.21":
+ version "10.12.21"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
+ integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
+
"@types/node@^6.0.46":
version "6.0.78"
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.78.tgz#5d4a3f579c1524e01ee21bf474e6fba09198f470"
integrity sha512-+vD6E8ixntRzzZukoF3uP1iV+ZjVN3koTcaeK+BEoc/kSfGbLDIGC7RmCaUgVpUfN6cWvfczFRERCyKM9mkvXg==
-"@types/node@^8.10.25":
- version "8.10.25"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.25.tgz#801fe4e39372cef18f268db880a5fbfcf71adc7e"
- integrity sha512-WXvAXaknB0c2cJ7N44e1kUrVu5K90mSfPPaT5XxfuSMxEWva86EYIwxUZM3jNZ2P1CIC9e2z4WJqpAF69PQxeA==
-
argparse@^1.0.7:
version "1.0.9"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
diff --git a/extensions/fsharp/cgmanifest.json b/extensions/fsharp/cgmanifest.json
index df594e070bb..d24f6a3d010 100644
--- a/extensions/fsharp/cgmanifest.json
+++ b/extensions/fsharp/cgmanifest.json
@@ -6,7 +6,7 @@
"git": {
"name": "ionide/ionide-fsgrammar",
"repositoryUrl": "https://github.com/ionide/ionide-fsgrammar",
- "commitHash": "24c1588529af144d205f66fbcec6889500f9aaa9"
+ "commitHash": "b2100c95d7857c5421d111a860fcdd20954a0263"
}
},
"license": "MIT",
@@ -15,4 +15,4 @@
}
],
"version": 1
-}
+}
\ No newline at end of file
diff --git a/extensions/fsharp/syntaxes/fsharp.tmLanguage.json b/extensions/fsharp/syntaxes/fsharp.tmLanguage.json
index 067389b1650..82e6d33548f 100644
--- a/extensions/fsharp/syntaxes/fsharp.tmLanguage.json
+++ b/extensions/fsharp/syntaxes/fsharp.tmLanguage.json
@@ -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/ionide/ionide-fsgrammar/commit/24c1588529af144d205f66fbcec6889500f9aaa9",
+ "version": "https://github.com/ionide/ionide-fsgrammar/commit/b2100c95d7857c5421d111a860fcdd20954a0263",
"name": "fsharp",
"scopeName": "source.fsharp",
"patterns": [
@@ -117,6 +117,9 @@
}
}
},
+ {
+ "include": "#compiler_directives"
+ },
{
"include": "#constants"
},
@@ -132,6 +135,21 @@
{
"include": "#keywords"
},
+ {
+ "include": "#text"
+ },
+ {
+ "include": "#definition"
+ },
+ {
+ "include": "#attributes"
+ },
+ {
+ "include": "#keywords"
+ },
+ {
+ "include": "#cexprs"
+ },
{
"include": "#text"
}
@@ -267,6 +285,33 @@
}
]
},
+ {
+ "begin": "(\\()",
+ "end": "(\\))",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.symbol.fsharp"
+ }
+ },
+ "endCaptures": {
+ "1": {
+ "name": "keyword.symbol.fsharp"
+ }
+ },
+ "patterns": [
+ {
+ "match": "(([?[:alpha:]0-9'`^._ ]+))+",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.fsharp"
+ }
+ }
+ },
+ {
+ "include": "#tuple_signature"
+ }
+ ]
+ },
{
"match": "(?!when|and|or\\b)\\b([\\w0-9'`^._]+)",
"comments": "Here we need the \\w modifier in order to check that the words isn't blacklisted",
@@ -553,7 +598,7 @@
"include": "#common_declaration"
},
{
- "match": "(\\?{0,1})([[:alpha:]0-9'`^._ ]+)\\s*(:)(\\s*([[:alpha:]0-9'`^._ ]+)){0,1}",
+ "match": "(\\?{0,1})([[:alpha:]0-9'`^._ ]+)\\s*(:)((?!with\\b)\\b([\\w0-9'`^._ ]+)){0,1}",
"captures": {
"1": {
"name": "keyword.symbol.fsharp"
@@ -754,9 +799,9 @@
}
},
{
- "begin": "(<(?![[:space:]]*\\)))",
+ "begin": "(<+(?![[:space:]]*\\)))",
"beginComment": "The group (?![[:space:]]*\\) is for protection against overload operator. static member (<)",
- "end": "((?)",
+ "end": "((?|\\))",
"endComment": "The group (? when using SRTP synthax",
"beginCaptures": {
"1": {
@@ -796,6 +841,14 @@
{
"include": "#definition"
},
+ {
+ "match": "(?<=>)\\s*(``([[:alpha:]0-9'^._ ]+)``|[[:alpha:]0-9'`^._]+)",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.fsharp"
+ }
+ }
+ },
{
"include": "#variables"
},
@@ -808,7 +861,7 @@
"patterns": [
{
"name": "binding.fsharp",
- "begin": "\\b(let mutable|let inline|let|member val|static member inline|static member|member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?",
+ "begin": "\\b(let mutable|static let mutable|let inline|let|member val|static member inline|static member|default|member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
"end": "\\s*(with\\b|=|\\n+=|(?<=\\=))",
"beginCaptures": {
"1": {
@@ -838,6 +891,26 @@
}
]
},
+ {
+ "name": "binding.fsharp",
+ "begin": "\\b((get|set)\\s*(?=\\())(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
+ "end": "\\s*(=|\\n+=|(?<=\\=))",
+ "beginCaptures": {
+ "3": {
+ "name": "variable.fsharp"
+ }
+ },
+ "endCaptures": {
+ "1": {
+ "name": "keyword.fsharp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#common_binding_definition"
+ }
+ ]
+ },
{
"name": "binding.fsharp",
"begin": "\\b(static val mutable|val mutable|val)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?",
@@ -902,7 +975,7 @@
}
},
{
- "match": "([[:alpha:]0-9'`^._]+)|``([[:alpha:]0-9'^._ ]+)``",
+ "match": "(``([[:alpha:]0-9'^._ ]+)``|[[:alpha:]0-9'`^._]+)",
"captures": {
"1": {
"name": "entity.name.type.fsharp"
@@ -1124,7 +1197,7 @@
"match": "\\(\\)"
},
{
- "match": "(\\?{0,1})(``[[:alpha:]0-9'`^:,._ ]+``|[[:alpha:]0-9'`<>^._ ]\\w*)",
+ "match": "(\\?{0,1})(``[[:alpha:]0-9'`^:,._ ]+``|(?!private\\b)\\b[\\w[:alpha:]0-9'`<>^._ ]+)",
"captures": {
"1": {
"name": "keyword.symbol.fsharp"
diff --git a/extensions/fsharp/test/colorize-results/test_fs.json b/extensions/fsharp/test/colorize-results/test_fs.json
index 37c0b61c14a..e5736fc10aa 100644
--- a/extensions/fsharp/test/colorize-results/test_fs.json
+++ b/extensions/fsharp/test/colorize-results/test_fs.json
@@ -604,28 +604,6 @@
"hc_black": "keyword: #569CD6"
}
},
- {
- "c": " get",
- "t": "source.fsharp",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "()",
- "t": "source.fsharp constant.language.unit.fsharp",
- "r": {
- "dark_plus": "constant.language: #569CD6",
- "light_plus": "constant.language: #0000FF",
- "dark_vs": "constant.language: #569CD6",
- "light_vs": "constant.language: #0000FF",
- "hc_black": "constant.language: #569CD6"
- }
- },
{
"c": " ",
"t": "source.fsharp",
@@ -637,9 +615,42 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "get",
+ "t": "source.fsharp binding.fsharp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "()",
+ "t": "source.fsharp binding.fsharp constant.language.unit.fsharp",
+ "r": {
+ "dark_plus": "constant.language: #569CD6",
+ "light_plus": "constant.language: #0000FF",
+ "dark_vs": "constant.language: #569CD6",
+ "light_vs": "constant.language: #0000FF",
+ "hc_black": "constant.language: #569CD6"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.fsharp binding.fsharp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
{
"c": "=",
- "t": "source.fsharp keyword.symbol.fsharp",
+ "t": "source.fsharp binding.fsharp keyword.fsharp",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -681,50 +692,6 @@
"hc_black": "keyword: #569CD6"
}
},
- {
- "c": " set",
- "t": "source.fsharp",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": "(",
- "t": "source.fsharp keyword.symbol.fsharp",
- "r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
- "dark_vs": "keyword: #569CD6",
- "light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
- }
- },
- {
- "c": "value",
- "t": "source.fsharp",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
- {
- "c": ")",
- "t": "source.fsharp keyword.symbol.fsharp",
- "r": {
- "dark_plus": "keyword: #569CD6",
- "light_plus": "keyword: #0000FF",
- "dark_vs": "keyword: #569CD6",
- "light_vs": "keyword: #0000FF",
- "hc_black": "keyword: #569CD6"
- }
- },
{
"c": " ",
"t": "source.fsharp",
@@ -736,9 +703,64 @@
"hc_black": "default: #FFFFFF"
}
},
+ {
+ "c": "set",
+ "t": "source.fsharp binding.fsharp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "(",
+ "t": "source.fsharp binding.fsharp keyword.symbol.fsharp",
+ "r": {
+ "dark_plus": "keyword: #569CD6",
+ "light_plus": "keyword: #0000FF",
+ "dark_vs": "keyword: #569CD6",
+ "light_vs": "keyword: #0000FF",
+ "hc_black": "keyword: #569CD6"
+ }
+ },
+ {
+ "c": "value",
+ "t": "source.fsharp binding.fsharp variable.parameter.fsharp",
+ "r": {
+ "dark_plus": "variable: #9CDCFE",
+ "light_plus": "variable: #001080",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "variable: #9CDCFE"
+ }
+ },
+ {
+ "c": ")",
+ "t": "source.fsharp binding.fsharp keyword.symbol.fsharp",
+ "r": {
+ "dark_plus": "keyword: #569CD6",
+ "light_plus": "keyword: #0000FF",
+ "dark_vs": "keyword: #569CD6",
+ "light_vs": "keyword: #0000FF",
+ "hc_black": "keyword: #569CD6"
+ }
+ },
+ {
+ "c": " ",
+ "t": "source.fsharp binding.fsharp",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
{
"c": "=",
- "t": "source.fsharp keyword.symbol.fsharp",
+ "t": "source.fsharp binding.fsharp keyword.fsharp",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -979,7 +1001,7 @@
}
},
{
- "c": " targetAge",
+ "c": " targetAge ",
"t": "source.fsharp binding.fsharp variable.parameter.fsharp",
"r": {
"dark_plus": "variable: #9CDCFE",
@@ -989,17 +1011,6 @@
"hc_black": "variable: #9CDCFE"
}
},
- {
- "c": " ",
- "t": "source.fsharp binding.fsharp",
- "r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
- }
- },
{
"c": "=",
"t": "source.fsharp binding.fsharp keyword.fsharp",
diff --git a/extensions/git/cgmanifest.json b/extensions/git/cgmanifest.json
index a7e0b63aac3..d0bdb9ac443 100644
--- a/extensions/git/cgmanifest.json
+++ b/extensions/git/cgmanifest.json
@@ -6,7 +6,7 @@
"git": {
"name": "textmate/git.tmbundle",
"repositoryUrl": "https://github.com/textmate/git.tmbundle",
- "commitHash": "93897a78c6e52bef13dadc0d4091d203c5facb40"
+ "commitHash": "3f6ad2138200db14b57a090ecb2d2e733275ca3e"
}
},
"licenseDetail": [
@@ -63,4 +63,4 @@
}
],
"version": 1
-}
+}
\ No newline at end of file
diff --git a/extensions/git/package.json b/extensions/git/package.json
index ef4385ef3db..4395d306bb5 100644
--- a/extensions/git/package.json
+++ b/extensions/git/package.json
@@ -240,6 +240,11 @@
"title": "%command.branch%",
"category": "Git"
},
+ {
+ "command": "git.branchFrom",
+ "title": "%command.branchFrom%",
+ "category": "Git"
+ },
{
"command": "git.deleteBranch",
"title": "%command.deleteBranch%",
@@ -320,6 +325,16 @@
"title": "%command.pushWithTagsForce%",
"category": "Git"
},
+ {
+ "command": "git.addRemote",
+ "title": "%command.addRemote%",
+ "category": "Git"
+ },
+ {
+ "command": "git.removeRemote",
+ "title": "%command.removeRemote%",
+ "category": "Git"
+ },
{
"command": "git.sync",
"title": "%command.sync%",
@@ -502,6 +517,10 @@
"command": "git.branch",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
+ {
+ "command": "git.branchFrom",
+ "when": "config.git.enabled && gitOpenRepositoryCount != 0"
+ },
{
"command": "git.deleteBranch",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
@@ -570,6 +589,14 @@
"command": "git.pushWithTagsForce",
"when": "config.git.enabled && config.git.allowForcePush && gitOpenRepositoryCount != 0"
},
+ {
+ "command": "git.addRemote",
+ "when": "config.git.enabled && gitOpenRepositoryCount != 0"
+ },
+ {
+ "command": "git.removeRemote",
+ "when": "config.git.enabled && gitOpenRepositoryCount != 0"
+ },
{
"command": "git.sync",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
@@ -661,94 +688,109 @@
"group": "1_sync",
"when": "scmProvider == git"
},
+ {
+ "command": "git.pushForce",
+ "group": "1_sync",
+ "when": "scmProvider == git && config.git.allowForcePush"
+ },
{
"command": "git.pushTo",
"group": "1_sync",
"when": "scmProvider == git"
},
+ {
+ "command": "git.pushToForce",
+ "group": "1_sync",
+ "when": "scmProvider == git && config.git.allowForcePush"
+ },
+ {
+ "command": "git.checkout",
+ "group": "2_branch",
+ "when": "scmProvider == git"
+ },
{
"command": "git.publish",
- "group": "2_publish",
+ "group": "2_branch",
"when": "scmProvider == git"
},
{
"command": "git.commitStaged",
- "group": "3_commit",
+ "group": "4_commit",
"when": "scmProvider == git"
},
{
"command": "git.commitStagedSigned",
- "group": "3_commit",
+ "group": "4_commit",
"when": "scmProvider == git"
},
{
"command": "git.commitStagedAmend",
- "group": "3_commit",
+ "group": "4_commit",
"when": "scmProvider == git"
},
{
"command": "git.commitAll",
- "group": "3_commit",
+ "group": "4_commit",
"when": "scmProvider == git"
},
{
"command": "git.commitAllSigned",
- "group": "3_commit",
+ "group": "4_commit",
"when": "scmProvider == git"
},
{
"command": "git.commitAllAmend",
- "group": "3_commit",
+ "group": "4_commit",
"when": "scmProvider == git"
},
{
"command": "git.undoCommit",
- "group": "3_commit",
+ "group": "4_commit",
"when": "scmProvider == git"
},
{
"command": "git.stageAll",
- "group": "4_stage",
+ "group": "5_stage",
"when": "scmProvider == git"
},
{
"command": "git.unstageAll",
- "group": "4_stage",
+ "group": "5_stage",
"when": "scmProvider == git"
},
{
"command": "git.cleanAll",
- "group": "4_stage",
+ "group": "5_stage",
"when": "scmProvider == git && !gitFreshRepository"
},
{
"command": "git.stashIncludeUntracked",
- "group": "5_stash",
+ "group": "6_stash",
"when": "scmProvider == git"
},
{
"command": "git.stash",
- "group": "5_stash",
+ "group": "6_stash",
"when": "scmProvider == git"
},
{
"command": "git.stashPop",
- "group": "5_stash",
+ "group": "6_stash",
"when": "scmProvider == git"
},
{
"command": "git.stashPopLatest",
- "group": "5_stash",
+ "group": "6_stash",
"when": "scmProvider == git"
},
{
"command": "git.stashApply",
- "group": "5_stash",
+ "group": "6_stash",
"when": "scmProvider == git"
},
{
"command": "git.stashApplyLatest",
- "group": "5_stash",
+ "group": "6_stash",
"when": "scmProvider == git"
},
{
@@ -989,7 +1031,7 @@
],
"markdownDescription": "%config.path%",
"default": null,
- "scope": "application"
+ "scope": "machine"
},
"git.autoRepositoryDetection": {
"type": [
@@ -1018,12 +1060,19 @@
},
"git.autofetch": {
"type": "boolean",
+ "scope": "resource",
"description": "%config.autofetch%",
"default": false,
"tags": [
"usesOnlineServices"
]
},
+ "git.autofetchPeriod": {
+ "type": "number",
+ "scope": "resource",
+ "description": "%config.autofetchPeriod%",
+ "default": 180
+ },
"git.branchValidationRegex": {
"type": "string",
"description": "%config.branchValidationRegex%",
@@ -1133,6 +1182,7 @@
"%config.postCommitCommand.sync%"
],
"markdownDescription": "%config.postCommitCommand%",
+ "scope": "resource",
"default": "none"
},
"git.showInlineOpenFileAction": {
@@ -1160,6 +1210,14 @@
"default": 72,
"description": "%config.inputValidationLength%"
},
+ "git.inputValidationSubjectLength": {
+ "type": [
+ "number",
+ "null"
+ ],
+ "default": 50,
+ "description": "%config.inputValidationSubjectLength%"
+ },
"git.detectSubmodules": {
"type": "boolean",
"scope": "resource",
@@ -1214,6 +1272,12 @@
"default": false,
"description": "%config.fetchOnPull%"
},
+ "git.autoStash": {
+ "type": "boolean",
+ "scope": "resource",
+ "default": false,
+ "description": "%config.autoStash%"
+ },
"git.allowForcePush": {
"type": "boolean",
"default": false,
@@ -1231,6 +1295,7 @@
},
"git.openDiffOnClick": {
"type": "boolean",
+ "scope": "resource",
"default": true,
"description": "%config.openDiffOnClick%"
}
@@ -1385,7 +1450,7 @@
"file-type": "^7.2.0",
"iconv-lite": "^0.4.24",
"jschardet": "^1.6.0",
- "vscode-extension-telemetry": "0.1.0",
+ "vscode-extension-telemetry": "0.1.1",
"vscode-nls": "^4.0.0",
"which": "^1.3.0"
},
@@ -1393,7 +1458,7 @@
"@types/byline": "4.2.31",
"@types/file-type": "^5.2.1",
"@types/mocha": "2.2.43",
- "@types/node": "^8.10.25",
+ "@types/node": "^10.12.21",
"@types/which": "^1.0.28",
"mocha": "^3.2.0"
}
diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json
index 356d1473bbc..892e3519cd1 100644
--- a/extensions/git/package.nls.json
+++ b/extensions/git/package.nls.json
@@ -32,6 +32,7 @@
"command.undoCommit": "Undo Last Commit",
"command.checkout": "Checkout to...",
"command.branch": "Create Branch...",
+ "command.branchFrom": "Create Branch From...",
"command.deleteBranch": "Delete Branch...",
"command.renameBranch": "Rename Branch...",
"command.merge": "Merge Branch...",
@@ -48,6 +49,8 @@
"command.pushToForce": "Push to... (Force)",
"command.pushWithTags": "Push With Tags",
"command.pushWithTagsForce": "Push With Tags (Force)",
+ "command.addRemote": "Add Remote",
+ "command.removeRemote": "Remove Remote",
"command.sync": "Sync",
"command.syncRebase": "Sync (Rebase)",
"command.publish": "Publish Branch",
@@ -68,6 +71,7 @@
"config.autoRepositoryDetection.openEditors": "Scan for parent folders of open files.",
"config.autorefresh": "Whether auto refreshing is enabled.",
"config.autofetch": "When enabled, commits will automatically be fetched from the default remote of the current Git repository.",
+ "config.autofetchPeriod": "Duration in seconds between each automatic git fetch, when `git.autofetch` is enabled.",
"config.confirmSync": "Confirm before synchronizing git repositories.",
"config.countBadge": "Controls the git badge counter.",
"config.countBadge.all": "Count all changes.",
@@ -97,6 +101,7 @@
"config.showPushSuccessNotification": "Controls whether to show a notification when a push is successful.",
"config.inputValidation": "Controls when to show commit message input validation.",
"config.inputValidationLength": "Controls the commit message length threshold for showing a warning.",
+ "config.inputValidationSubjectLength": "Controls the commit message subject length threshold for showing a warning. Unset it to inherit the value of `config.inputValidationLength`.",
"config.detectSubmodules": "Controls whether to automatically detect git submodules.",
"config.detectSubmodulesLimit": "Controls the limit of git submodules detected.",
"config.alwaysShowStagedChangesResourceGroup": "Always show the Staged Changes resource group.",
@@ -107,6 +112,7 @@
"config.rebaseWhenSync": "Force git to use rebase when running the sync command.",
"config.confirmEmptyCommits": "Always confirm the creation of empty commits.",
"config.fetchOnPull": "Fetch all branches when pulling or just the current one.",
+ "config.autoStash": "Stash any changes before pulling and restore them after successful pull.",
"config.allowForcePush": "Controls whether force push (with or without lease) is enabled.",
"config.useForcePushWithLease": "Controls whether force pushing uses the safer force-with-lease variant.",
"config.confirmForcePush": "Controls whether to ask for confirmation before force-pushing.",
diff --git a/extensions/git/resources/icons/dark/open-change.svg b/extensions/git/resources/icons/dark/open-change.svg
index e43ba7616c5..6f785c26a5e 100644
--- a/extensions/git/resources/icons/dark/open-change.svg
+++ b/extensions/git/resources/icons/dark/open-change.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/extensions/git/resources/icons/light/open-change.svg b/extensions/git/resources/icons/light/open-change.svg
index e53964f3b81..873b93d8106 100644
--- a/extensions/git/resources/icons/light/open-change.svg
+++ b/extensions/git/resources/icons/light/open-change.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/extensions/git/src/api/api1.ts b/extensions/git/src/api/api1.ts
index 9469580d97b..25742babc15 100644
--- a/extensions/git/src/api/api1.ts
+++ b/extensions/git/src/api/api1.ts
@@ -5,7 +5,7 @@
import { Model } from '../model';
import { Repository as BaseRepository, Resource } from '../repository';
-import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, Ref, Submodule, Commit, Change, RepositoryUIState, Status } from './git';
+import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, Ref, Submodule, Commit, Change, RepositoryUIState, Status, LogOptions } from './git';
import { Event, SourceControlInputBox, Uri, SourceControl } from 'vscode';
import { mapEvent } from '../util';
@@ -76,6 +76,10 @@ export class ApiRepository implements Repository {
return this._repository.setConfig(key, value);
}
+ getGlobalConfig(key: string): Promise {
+ return this._repository.getGlobalConfig(key);
+ }
+
getObjectDetails(treeish: string, path: string): Promise<{ mode: string; object: string; size: number; }> {
return this._repository.getObjectDetails(treeish, path);
}
@@ -104,19 +108,27 @@ export class ApiRepository implements Repository {
return this._repository.diff(cached);
}
- diffWithHEAD(path: string): Promise {
+ diffWithHEAD(): Promise;
+ diffWithHEAD(path: string): Promise;
+ diffWithHEAD(path?: string): Promise {
return this._repository.diffWithHEAD(path);
}
- diffWith(ref: string, path: string): Promise {
+ diffWith(ref: string): Promise;
+ diffWith(ref: string, path: string): Promise;
+ diffWith(ref: string, path?: string): Promise {
return this._repository.diffWith(ref, path);
}
- diffIndexWithHEAD(path: string): Promise {
+ diffIndexWithHEAD(): Promise;
+ diffIndexWithHEAD(path: string): Promise;
+ diffIndexWithHEAD(path?: string): Promise {
return this._repository.diffIndexWithHEAD(path);
}
- diffIndexWith(ref: string, path: string): Promise {
+ diffIndexWith(ref: string): Promise;
+ diffIndexWith(ref: string, path: string): Promise;
+ diffIndexWith(ref: string, path?: string): Promise {
return this._repository.diffIndexWith(ref, path);
}
@@ -124,7 +136,9 @@ export class ApiRepository implements Repository {
return this._repository.diffBlobs(object1, object2);
}
- diffBetween(ref1: string, ref2: string, path: string): Promise {
+ diffBetween(ref1: string, ref2: string): Promise;
+ diffBetween(ref1: string, ref2: string, path: string): Promise;
+ diffBetween(ref1: string, ref2: string, path?: string): Promise {
return this._repository.diffBetween(ref1, ref2, path);
}
@@ -168,17 +182,25 @@ export class ApiRepository implements Repository {
return this._repository.removeRemote(name);
}
- fetch(remote?: string | undefined, ref?: string | undefined): Promise {
- return this._repository.fetch(remote, ref);
+ fetch(remote?: string | undefined, ref?: string | undefined, depth?: number | undefined): Promise {
+ return this._repository.fetch(remote, ref, depth);
}
- pull(): Promise {
- return this._repository.pull();
+ pull(unshallow?: boolean): Promise {
+ return this._repository.pull(undefined, unshallow);
}
push(remoteName?: string, branchName?: string, setUpstream: boolean = false): Promise {
return this._repository.pushTo(remoteName, branchName, setUpstream);
}
+
+ blame(path: string): Promise {
+ return this._repository.blame(path);
+ }
+
+ log(options?: LogOptions): Promise {
+ return this._repository.log(options);
+ }
}
export class ApiGit implements Git {
diff --git a/extensions/git/src/api/git.d.ts b/extensions/git/src/api/git.d.ts
index ea4d1f97d6c..ae8eb5315bc 100644
--- a/extensions/git/src/api/git.d.ts
+++ b/extensions/git/src/api/git.d.ts
@@ -41,6 +41,7 @@ export interface Commit {
readonly hash: string;
readonly message: string;
readonly parents: string[];
+ readonly authorEmail?: string | undefined;
}
export interface Submodule {
@@ -67,6 +68,7 @@ export const enum Status {
DELETED,
UNTRACKED,
IGNORED,
+ INTENT_TO_ADD,
ADDED_BY_US,
ADDED_BY_THEM,
@@ -109,6 +111,14 @@ export interface RepositoryUIState {
readonly onDidChange: Event;
}
+/**
+ * Log options.
+ */
+export interface LogOptions {
+ /** Max number of log entries to retrieve. If not specified, the default is 32. */
+ readonly maxEntries?: number;
+}
+
export interface Repository {
readonly rootUri: Uri;
@@ -119,6 +129,7 @@ export interface Repository {
getConfigs(): Promise<{ key: string; value: string; }[]>;
getConfig(key: string): Promise;
setConfig(key: string, value: string): Promise;
+ getGlobalConfig(key: string): Promise;
getObjectDetails(treeish: string, path: string): Promise<{ mode: string, object: string, size: number }>;
detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }>;
@@ -130,11 +141,16 @@ export interface Repository {
apply(patch: string, reverse?: boolean): Promise;
diff(cached?: boolean): Promise;
+ diffWithHEAD(): Promise;
diffWithHEAD(path: string): Promise;
+ diffWith(ref: string): Promise;
diffWith(ref: string, path: string): Promise;
+ diffIndexWithHEAD(): Promise;
diffIndexWithHEAD(path: string): Promise;
+ diffIndexWith(ref: string): Promise;
diffIndexWith(ref: string, path: string): Promise;
diffBlobs(object1: string, object2: string): Promise;
+ diffBetween(ref1: string, ref2: string): Promise;
diffBetween(ref1: string, ref2: string, path: string): Promise;
hashObject(data: string): Promise;
@@ -152,9 +168,12 @@ export interface Repository {
addRemote(name: string, url: string): Promise;
removeRemote(name: string): Promise;
- fetch(remote?: string, ref?: string): Promise;
- pull(): Promise;
+ fetch(remote?: string, ref?: string, depth?: number): Promise;
+ pull(unshallow?: boolean): Promise;
push(remoteName?: string, branchName?: string, setUpstream?: boolean): Promise;
+
+ blame(path: string): Promise;
+ log(options?: LogOptions): Promise;
}
export interface API {
@@ -214,4 +233,6 @@ export const enum GitErrorCodes {
WrongCase = 'WrongCase',
CantLockRef = 'CantLockRef',
CantRebaseMultipleBranches = 'CantRebaseMultipleBranches',
+ PatchDoesNotApply = 'PatchDoesNotApply',
+ NoPathFound = 'NoPathFound'
}
\ No newline at end of file
diff --git a/extensions/git/src/askpass.ts b/extensions/git/src/askpass.ts
index b0dc28f8dd6..03000c7290d 100644
--- a/extensions/git/src/askpass.ts
+++ b/extensions/git/src/askpass.ts
@@ -65,7 +65,7 @@ export class Askpass implements Disposable {
return ipcHandlePath;
}
- private onRequest(req: http.ServerRequest, res: http.ServerResponse): void {
+ private onRequest(req: http.IncomingMessage, res: http.ServerResponse): void {
const chunks: string[] = [];
req.setEncoding('utf8');
req.on('data', (d: string) => chunks.push(d));
diff --git a/extensions/git/src/autofetch.ts b/extensions/git/src/autofetch.ts
index bd95f7dc03f..9fd81bfabfe 100644
--- a/extensions/git/src/autofetch.ts
+++ b/extensions/git/src/autofetch.ts
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-import { workspace, Disposable, EventEmitter, Memento, window, MessageItem, ConfigurationTarget } from 'vscode';
+import { workspace, Disposable, EventEmitter, Memento, window, MessageItem, ConfigurationTarget, Uri } from 'vscode';
import { Repository, Operation } from './repository';
import { eventToPromise, filterEvent, onceEvent } from './util';
import * as nls from 'vscode-nls';
@@ -17,7 +17,6 @@ function isRemoteOperation(operation: Operation): boolean {
export class AutoFetcher {
- private static readonly Period = 3 * 60 * 1000 /* three minutes */;
private static DidInformUser = 'autofetch.didInformUser';
private _onDidChange = new EventEmitter();
@@ -61,7 +60,7 @@ export class AutoFetcher {
}
if (result === yes) {
- const gitConfig = workspace.getConfiguration('git');
+ const gitConfig = workspace.getConfiguration('git', Uri.file(this.repository.root));
gitConfig.update('autofetch', true, ConfigurationTarget.Global);
}
@@ -69,7 +68,7 @@ export class AutoFetcher {
}
private onConfiguration(): void {
- const gitConfig = workspace.getConfiguration('git');
+ const gitConfig = workspace.getConfiguration('git', Uri.file(this.repository.root));
if (gitConfig.get('autofetch') === false) {
this.disable();
@@ -111,8 +110,10 @@ export class AutoFetcher {
return;
}
- const timeout = new Promise(c => setTimeout(c, AutoFetcher.Period));
+ const period = workspace.getConfiguration('git', Uri.file(this.repository.root)).get('autofetchPeriod', 180) * 1000;
+ const timeout = new Promise(c => setTimeout(c, period));
const whenDisabled = eventToPromise(filterEvent(this.onDidChange, enabled => !enabled));
+
await Promise.race([timeout, whenDisabled]);
}
}
diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts
index e41a8161c56..f6e00e9abdd 100755
--- a/extensions/git/src/commands.ts
+++ b/extensions/git/src/commands.ts
@@ -93,7 +93,7 @@ class CreateBranchItem implements QuickPickItem {
constructor(private cc: CommandCenter) { }
- get label(): string { return localize('create branch', '$(plus) Create new branch'); }
+ get label(): string { return localize('create branch', '$(plus) Create new branch...'); }
get description(): string { return ''; }
get alwaysShow(): boolean { return true; }
@@ -103,6 +103,29 @@ class CreateBranchItem implements QuickPickItem {
}
}
+class CreateBranchFromItem implements QuickPickItem {
+
+ constructor(private cc: CommandCenter) { }
+
+ get label(): string { return localize('create branch from', '$(plus) Create new branch from...'); }
+ get description(): string { return ''; }
+
+ get alwaysShow(): boolean { return true; }
+
+ async run(repository: Repository): Promise {
+ await this.cc.branch(repository);
+ }
+}
+
+class HEADItem implements QuickPickItem {
+
+ constructor(private repository: Repository) { }
+
+ get label(): string { return 'HEAD'; }
+ get description(): string { return (this.repository.HEAD && this.repository.HEAD.commit || '').substr(0, 8); }
+ get alwaysShow(): boolean { return true; }
+}
+
interface CommandOptions {
repository?: boolean;
diff?: boolean;
@@ -154,6 +177,22 @@ async function categorizeResourceByResolution(resources: Resource[]): Promise<{
return { merge, resolved, unresolved, deletionConflicts };
}
+function createCheckoutItems(repository: Repository): CheckoutItem[] {
+ const config = workspace.getConfiguration('git');
+ const checkoutType = config.get('checkoutType') || 'all';
+ const includeTags = checkoutType === 'all' || checkoutType === 'tags';
+ const includeRemotes = checkoutType === 'all' || checkoutType === 'remote';
+
+ const heads = repository.refs.filter(ref => ref.type === RefType.Head)
+ .map(ref => new CheckoutItem(ref));
+ const tags = (includeTags ? repository.refs.filter(ref => ref.type === RefType.Tag) : [])
+ .map(ref => new CheckoutTagItem(ref));
+ const remoteHeads = (includeRemotes ? repository.refs.filter(ref => ref.type === RefType.RemoteHead) : [])
+ .map(ref => new CheckoutRemoteHeadItem(ref));
+
+ return [...heads, ...tags, ...remoteHeads];
+}
+
enum PushType {
Push,
PushTo,
@@ -340,6 +379,7 @@ export class CommandCenter {
case Status.MODIFIED:
case Status.UNTRACKED:
case Status.IGNORED:
+ case Status.INTENT_TO_ADD:
const repository = this.model.getRepository(resource.resourceUri);
if (!repository) {
@@ -496,6 +536,7 @@ export class CommandCenter {
@command('git.init')
async init(): Promise {
let repositoryPath: string | undefined = undefined;
+ let askToOpen = true;
if (workspace.workspaceFolders) {
const placeHolder = localize('init', "Pick workspace folder to initialize git repo in");
@@ -510,6 +551,7 @@ export class CommandCenter {
return;
} else if (item.folder) {
repositoryPath = item.folder.uri.fsPath;
+ askToOpen = false;
}
}
@@ -543,6 +585,10 @@ export class CommandCenter {
}
repositoryPath = uri.fsPath;
+
+ if (workspace.workspaceFolders && workspace.workspaceFolders.some(w => w.uri.toString() === uri.toString())) {
+ askToOpen = false;
+ }
}
await this.git.init(repositoryPath);
@@ -552,6 +598,10 @@ export class CommandCenter {
const open = localize('openrepo', "Open Repository");
choices.push(open);
+ if (!askToOpen) {
+ return;
+ }
+
const addToWorkspace = localize('add', "Add to Workspace");
if (workspace.workspaceFolders) {
message = localize('proposeopen2 init', "Would you like to open the initialized repository, or add it to the current workspace?");
@@ -613,14 +663,16 @@ export class CommandCenter {
if (!(resource instanceof Resource)) {
// can happen when called from a keybinding
+ console.log('WHAT');
resource = this.getSCMResource();
}
if (resource) {
- const resources = ([resource, ...resourceStates] as Resource[])
- .filter(r => r.type !== Status.DELETED && r.type !== Status.INDEX_DELETED);
-
- uris = resources.map(r => r.resourceUri);
+ uris = ([resource, ...resourceStates] as Resource[])
+ .filter(r => r.type !== Status.DELETED && r.type !== Status.INDEX_DELETED)
+ .map(r => r.resourceUri);
+ } else if (window.activeTextEditor) {
+ uris = [window.activeTextEditor.document.uri];
}
}
@@ -629,6 +681,7 @@ export class CommandCenter {
}
const activeTextEditor = window.activeTextEditor;
+
for (const uri of uris) {
const opts: TextDocumentShowOptions = {
preserveFocus,
@@ -1384,55 +1437,59 @@ export class CommandCenter {
return true;
}
- const config = workspace.getConfiguration('git');
- const checkoutType = config.get('checkoutType') || 'all';
- const includeTags = checkoutType === 'all' || checkoutType === 'tags';
- const includeRemotes = checkoutType === 'all' || checkoutType === 'remote';
-
const createBranch = new CreateBranchItem(this);
-
- const heads = repository.refs.filter(ref => ref.type === RefType.Head)
- .map(ref => new CheckoutItem(ref));
-
- const tags = (includeTags ? repository.refs.filter(ref => ref.type === RefType.Tag) : [])
- .map(ref => new CheckoutTagItem(ref));
-
- const remoteHeads = (includeRemotes ? repository.refs.filter(ref => ref.type === RefType.RemoteHead) : [])
- .map(ref => new CheckoutRemoteHeadItem(ref));
-
- const picks = [createBranch, ...heads, ...tags, ...remoteHeads];
+ const createBranchFrom = new CreateBranchFromItem(this);
+ const picks = [createBranch, createBranchFrom, ...createCheckoutItems(repository)];
const placeHolder = localize('select a ref to checkout', 'Select a ref to checkout');
- const choice = await window.showQuickPick(picks, { placeHolder });
+
+ const quickpick = window.createQuickPick();
+ quickpick.items = picks;
+ quickpick.placeholder = placeHolder;
+ quickpick.ignoreFocusOut = true;
+ quickpick.show();
+
+ const choice = await new Promise(c => quickpick.onDidAccept(() => c(quickpick.activeItems[0])));
+ quickpick.hide();
if (!choice) {
return false;
}
- await choice.run(repository);
+ if (choice === createBranch) {
+ await this._branch(repository, quickpick.value);
+ } else if (choice === createBranchFrom) {
+ await this._branch(repository, quickpick.value, true);
+ } else {
+ await (choice as CheckoutItem).run(repository);
+ }
+
return true;
}
@command('git.branch', { repository: true })
async branch(repository: Repository): Promise {
+ await this._branch(repository);
+ }
+
+ @command('git.branchFrom', { repository: true })
+ async branchFrom(repository: Repository): Promise {
+ await this._branch(repository, undefined, true);
+ }
+
+ private async _branch(repository: Repository, defaultName?: string, from = false): Promise {
const config = workspace.getConfiguration('git');
- const branchValidationRegex = config.get('branchValidationRegex')!;
const branchWhitespaceChar = config.get('branchWhitespaceChar')!;
- const validateName = new RegExp(branchValidationRegex);
- const sanitize = (name: string) => {
- name = name.trim();
+ const branchValidationRegex = config.get('branchValidationRegex')!;
+ const sanitize = (name: string) => name ?
+ name.trim().replace(/^\.|\/\.|\.\.|~|\^|:|\/$|\.lock$|\.lock\/|\\|\*|\s|^\s*$|\.$|\[|\]$/g, branchWhitespaceChar)
+ : name;
- if (!name) {
- return name;
- }
-
- return name.replace(/^\.|\/\.|\.\.|~|\^|:|\/$|\.lock$|\.lock\/|\\|\*|\s|^\s*$|\.$|\[|\]$/g, branchWhitespaceChar);
- };
-
- const result = await window.showInputBox({
+ const rawBranchName = defaultName || await window.showInputBox({
placeHolder: localize('branch name', "Branch name"),
prompt: localize('provide branch name', "Please provide a branch name"),
ignoreFocusOut: true,
validateInput: (name: string) => {
+ const validateName = new RegExp(branchValidationRegex);
if (validateName.test(sanitize(name))) {
return null;
}
@@ -1441,13 +1498,27 @@ export class CommandCenter {
}
});
- const name = sanitize(result || '');
+ const branchName = sanitize(rawBranchName || '');
- if (!name) {
+ if (!branchName) {
return;
}
- await repository.branch(name, true);
+ let target = 'HEAD';
+
+ if (from) {
+ const picks = [new HEADItem(repository), ...createCheckoutItems(repository)];
+ const placeHolder = localize('select a ref to create a new branch from', 'Select a ref to create the \'{0}\' branch from', branchName);
+ const choice = await window.showQuickPick(picks, { placeHolder });
+
+ if (!choice) {
+ return;
+ }
+
+ target = choice.label;
+ }
+
+ await repository.branch(branchName, true, target);
}
@command('git.deleteBranch', { repository: true })
@@ -1761,6 +1832,72 @@ export class CommandCenter {
await this._push(repository, { pushType: PushType.PushTo, forcePush: true });
}
+ @command('git.addRemote', { repository: true })
+ async addRemote(repository: Repository): Promise {
+ const remotes = repository.remotes;
+
+ const sanitize = (name: string) => {
+ name = name.trim();
+ return name && name.replace(/^\.|\/\.|\.\.|~|\^|:|\/$|\.lock$|\.lock\/|\\|\*|\s|^\s*$|\.$|\[|\]$/g, '-');
+ };
+
+ const resultName = await window.showInputBox({
+ placeHolder: localize('remote name', "Remote name"),
+ prompt: localize('provide remote name', "Please provide a remote name"),
+ ignoreFocusOut: true,
+ validateInput: (name: string) => {
+ if (sanitize(name)) {
+ return null;
+ }
+ return localize('remote name format invalid', "Remote name format invalid");
+ }
+ });
+
+ const name = sanitize(resultName || '');
+
+ if (!name) {
+ return;
+ }
+
+ if (remotes.find(r => r.name === name)) {
+ window.showErrorMessage(localize('remote already exists', "Remote '{0}' already exists.", name));
+ return;
+ }
+
+ const url = await window.showInputBox({
+ placeHolder: localize('remote url', "Remote URL"),
+ prompt: localize('provide remote URL', "Enter URL for remote \"{0}\"", name),
+ ignoreFocusOut: true
+ });
+
+ if (!url) {
+ return;
+ }
+
+ await repository.addRemote(name, url);
+ }
+
+ @command('git.removeRemote', { repository: true })
+ async removeRemote(repository: Repository): Promise {
+ const remotes = repository.remotes;
+
+ if (remotes.length === 0) {
+ window.showErrorMessage(localize('no remotes added', "Your repository has no remotes."));
+ return;
+ }
+
+ const picks = remotes.map(r => r.name);
+ const placeHolder = localize('remove remote', "Pick a remote to remove");
+
+ const remoteName = await window.showQuickPick(picks, { placeHolder });
+
+ if (!remoteName) {
+ return;
+ }
+
+ await repository.removeRemote(remoteName);
+ }
+
private async _sync(repository: Repository, rebase: boolean): Promise {
const HEAD = repository.HEAD;
@@ -2078,6 +2215,7 @@ export class CommandCenter {
uri = uri ? uri : (window.activeTextEditor && window.activeTextEditor.document.uri);
this.outputChannel.appendLine(`git.getSCMResource.uri ${uri && uri.toString()}`);
+
for (const r of this.model.repositories.map(r => r.root)) {
this.outputChannel.appendLine(`repo root ${r}`);
}
diff --git a/extensions/git/src/decorationProvider.ts b/extensions/git/src/decorationProvider.ts
index 0c27365bc51..9f17b20ee8e 100644
--- a/extensions/git/src/decorationProvider.ts
+++ b/extensions/git/src/decorationProvider.ts
@@ -20,7 +20,6 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
private disposables: Disposable[] = [];
constructor(private model: Model) {
- //todo@joh -> events when the ignore status actually changes, not only when the file changes
this.onDidChangeDecorations = fireEvent(anyEvent(
filterEvent(workspace.onDidSaveTextDocument, e => e.fileName.endsWith('.gitignore')),
model.onDidOpenRepository,
@@ -119,7 +118,7 @@ class GitDecorationProvider implements DecorationProvider {
const uris = new Set([...this.decorations.keys()].concat([...newDecorations.keys()]));
this.decorations = newDecorations;
- this._onDidChangeDecorations.fire([...uris.values()].map(Uri.parse));
+ this._onDidChangeDecorations.fire([...uris.values()].map(value => Uri.parse(value, true)));
}
private collectDecorationData(group: GitResourceGroup, bucket: Map): void {
diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts
index ff7e7bdd607..42952e0ca05 100644
--- a/extensions/git/src/git.ts
+++ b/extensions/git/src/git.ts
@@ -12,9 +12,9 @@ import { EventEmitter } from 'events';
import iconv = require('iconv-lite');
import * as filetype from 'file-type';
import { assign, groupBy, denodeify, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent } from './util';
-import { CancellationToken } from 'vscode';
+import { CancellationToken, Uri } from 'vscode';
import { detectEncoding } from './encoding';
-import { Ref, RefType, Branch, Remote, GitErrorCodes } from './api/git';
+import { Ref, RefType, Branch, Remote, GitErrorCodes, LogOptions, Change, Status } from './api/git';
const readfile = denodeify(fs.readFile);
@@ -114,17 +114,17 @@ function findGitWin32InPath(onLookup: (path: string) => void): Promise {
function findGitWin32(onLookup: (path: string) => void): Promise {
return findSystemGitWin32(process.env['ProgramW6432'] as string, onLookup)
- .then(void 0, () => findSystemGitWin32(process.env['ProgramFiles(x86)'] as string, onLookup))
- .then(void 0, () => findSystemGitWin32(process.env['ProgramFiles'] as string, onLookup))
- .then(void 0, () => findSystemGitWin32(path.join(process.env['LocalAppData'] as string, 'Programs'), onLookup))
- .then(void 0, () => findGitWin32InPath(onLookup));
+ .then(undefined, () => findSystemGitWin32(process.env['ProgramFiles(x86)'] as string, onLookup))
+ .then(undefined, () => findSystemGitWin32(process.env['ProgramFiles'] as string, onLookup))
+ .then(undefined, () => findSystemGitWin32(path.join(process.env['LocalAppData'] as string, 'Programs'), onLookup))
+ .then(undefined, () => findGitWin32InPath(onLookup));
}
export function findGit(hint: string | undefined, onLookup: (path: string) => void): Promise {
const first = hint ? findSpecificGit(hint, onLookup) : Promise.reject(null);
return first
- .then(void 0, () => {
+ .then(undefined, () => {
switch (process.platform) {
case 'darwin': return findGitDarwin(onLookup);
case 'win32': return findGitWin32(onLookup);
@@ -248,7 +248,7 @@ export class GitError {
this.error = data.error;
this.message = data.error.message;
} else {
- this.error = void 0;
+ this.error = undefined;
this.message = '';
}
@@ -306,11 +306,15 @@ function getGitErrorCode(stderr: string): string | undefined {
return GitErrorCodes.BranchAlreadyExists;
} else if (/'.+' is not a valid branch name/.test(stderr)) {
return GitErrorCodes.InvalidBranchName;
+ } else if (/Please,? commit your changes or stash them/.test(stderr)) {
+ return GitErrorCodes.DirtyWorkTree;
}
- return void 0;
+ return undefined;
}
+const COMMIT_FORMAT = '%H\n%ae\n%P\n%B';
+
export class Git {
readonly path: string;
@@ -347,7 +351,7 @@ export class Git {
await mkdirp(parentPath);
try {
- await this.exec(parentPath, ['clone', url, folderPath], { cancellationToken });
+ await this.exec(parentPath, ['clone', url.includes(' ') ? encodeURI(url) : url, folderPath], { cancellationToken });
} catch (err) {
if (err.stderr) {
err.stderr = err.stderr.replace(/^Cloning.+$/m, '').trim();
@@ -450,6 +454,7 @@ export interface Commit {
hash: string;
message: string;
parents: string[];
+ authorEmail?: string | undefined;
}
export class GitStatusParser {
@@ -581,13 +586,13 @@ export function parseGitmodules(raw: string): Submodule[] {
}
export function parseGitCommit(raw: string): Commit | null {
- const match = /^([0-9a-f]{40})\n(.*)\n([^]*)$/m.exec(raw.trim());
+ const match = /^([0-9a-f]{40})\n(.*)\n(.*)\n([^]*)$/m.exec(raw.trim());
if (!match) {
return null;
}
- const parents = match[2] ? match[2].split(' ') : [];
- return { hash: match[1], message: match[3], parents };
+ const parents = match[3] ? match[3].split(' ') : [];
+ return { hash: match[1], message: match[4], parents, authorEmail: match[2] };
}
interface LsTreeElement {
@@ -629,6 +634,10 @@ export interface CommitOptions {
empty?: boolean;
}
+export interface PullOptions {
+ unshallow?: boolean;
+}
+
export enum ForcePushMode {
Force,
ForceWithLease
@@ -697,6 +706,41 @@ export class Repository {
});
}
+ async log(options?: LogOptions): Promise {
+ const maxEntries = options && typeof options.maxEntries === 'number' && options.maxEntries > 0 ? options.maxEntries : 32;
+ const args = ['log', '-' + maxEntries, `--pretty=format:${COMMIT_FORMAT}%x00%x00`];
+ const gitResult = await this.run(args);
+ if (gitResult.exitCode) {
+ // An empty repo.
+ return [];
+ }
+
+ const s = gitResult.stdout;
+ const result: Commit[] = [];
+ let index = 0;
+ while (index < s.length) {
+ let nextIndex = s.indexOf('\x00\x00', index);
+ if (nextIndex === -1) {
+ nextIndex = s.length;
+ }
+
+ let entry = s.substr(index, nextIndex - index);
+ if (entry.startsWith('\n')) {
+ entry = entry.substring(1);
+ }
+
+ const commit = parseGitCommit(entry);
+ if (!commit) {
+ break;
+ }
+
+ result.push(commit);
+ index = nextIndex + 2;
+ }
+
+ return result;
+ }
+
async bufferString(object: string, encoding: string = 'utf8', autoGuessEncoding = false): Promise {
const stdout = await this.buffer(object);
@@ -829,7 +873,15 @@ export class Repository {
args.push('-R');
}
- await this.run(args);
+ try {
+ await this.run(args);
+ } catch (err) {
+ if (/patch does not apply/.test(err.stderr)) {
+ err.gitErrorCode = GitErrorCodes.PatchDoesNotApply;
+ }
+
+ throw err;
+ }
}
async diff(cached = false): Promise {
@@ -843,25 +895,53 @@ export class Repository {
return result.stdout;
}
- async diffWithHEAD(path: string): Promise {
+ diffWithHEAD(): Promise;
+ diffWithHEAD(path: string): Promise;
+ diffWithHEAD(path?: string | undefined): Promise;
+ async diffWithHEAD(path?: string | undefined): Promise {
+ if (!path) {
+ return await this.diffFiles(false);
+ }
+
const args = ['diff', '--', path];
const result = await this.run(args);
return result.stdout;
}
- async diffWith(ref: string, path: string): Promise {
+ diffWith(ref: string): Promise;
+ diffWith(ref: string, path: string): Promise;
+ diffWith(ref: string, path?: string | undefined): Promise;
+ async diffWith(ref: string, path?: string): Promise {
+ if (!path) {
+ return await this.diffFiles(false, ref);
+ }
+
const args = ['diff', ref, '--', path];
const result = await this.run(args);
return result.stdout;
}
- async diffIndexWithHEAD(path: string): Promise {
+ diffIndexWithHEAD(): Promise;
+ diffIndexWithHEAD(path: string): Promise;
+ diffIndexWithHEAD(path?: string | undefined): Promise;
+ async diffIndexWithHEAD(path?: string): Promise {
+ if (!path) {
+ return await this.diffFiles(true);
+ }
+
const args = ['diff', '--cached', '--', path];
const result = await this.run(args);
return result.stdout;
}
- async diffIndexWith(ref: string, path: string): Promise {
+ diffIndexWith(ref: string): Promise;
+ diffIndexWith(ref: string, path: string): Promise;
+ diffIndexWith(ref: string, path?: string | undefined): Promise;
+ async diffIndexWith(ref: string, path?: string): Promise {
+ if (!path) {
+ return await this.diffFiles(true, ref);
+ }
+
const args = ['diff', '--cached', ref, '--', path];
const result = await this.run(args);
return result.stdout;
@@ -873,13 +953,102 @@ export class Repository {
return result.stdout;
}
- async diffBetween(ref1: string, ref2: string, path: string): Promise {
- const args = ['diff', `${ref1}...${ref2}`, '--', path];
+ diffBetween(ref1: string, ref2: string): Promise;
+ diffBetween(ref1: string, ref2: string, path: string): Promise;
+ diffBetween(ref1: string, ref2: string, path?: string | undefined): Promise;
+ async diffBetween(ref1: string, ref2: string, path?: string): Promise {
+ const range = `${ref1}...${ref2}`;
+ if (!path) {
+ return await this.diffFiles(false, range);
+ }
+
+ const args = ['diff', range, '--', path];
const result = await this.run(args);
return result.stdout.trim();
}
+ private async diffFiles(cached: boolean, ref?: string): Promise {
+ const args = ['diff', '--name-status', '-z', '--diff-filter=ADMR'];
+ if (cached) {
+ args.push('--cached');
+ }
+
+ if (ref) {
+ args.push(ref);
+ }
+
+ const gitResult = await this.run(args);
+ if (gitResult.exitCode) {
+ return [];
+ }
+
+ const entries = gitResult.stdout.split('\x00');
+ let index = 0;
+ const result: Change[] = [];
+
+ entriesLoop:
+ while (index < entries.length - 1) {
+ const change = entries[index++];
+ const resourcePath = entries[index++];
+ if (!change || !resourcePath) {
+ break;
+ }
+
+ const originalUri = Uri.file(path.isAbsolute(resourcePath) ? resourcePath : path.join(this.repositoryRoot, resourcePath));
+ let status: Status = Status.UNTRACKED;
+
+ // Copy or Rename status comes with a number, e.g. 'R100'. We don't need the number, so we use only first character of the status.
+ switch (change[0]) {
+ case 'M':
+ status = Status.MODIFIED;
+ break;
+
+ case 'A':
+ status = Status.INDEX_ADDED;
+ break;
+
+ case 'D':
+ status = Status.DELETED;
+ break;
+
+ // Rename contains two paths, the second one is what the file is renamed/copied to.
+ case 'R':
+ if (index >= entries.length) {
+ break;
+ }
+
+ const newPath = entries[index++];
+ if (!newPath) {
+ break;
+ }
+
+ const uri = Uri.file(path.isAbsolute(newPath) ? newPath : path.join(this.repositoryRoot, newPath));
+ result.push({
+ uri,
+ renameUri: uri,
+ originalUri,
+ status: Status.INDEX_RENAMED
+ });
+
+ continue;
+
+ default:
+ // Unknown status
+ break entriesLoop;
+ }
+
+ result.push({
+ status,
+ originalUri,
+ uri: originalUri,
+ renameUri: originalUri,
+ });
+ }
+
+ return result;
+ }
+
async getMergeBase(ref1: string, ref2: string): Promise {
const args = ['merge-base', ref1, ref2];
const result = await this.run(args);
@@ -1034,7 +1203,7 @@ export class Repository {
}
async branch(name: string, checkout: boolean, ref?: string): Promise {
- const args = checkout ? ['checkout', '-q', '-b', name] : ['branch', '-q', name];
+ const args = checkout ? ['checkout', '-q', '-b', name, '--no-track'] : ['branch', '-q', name];
if (ref) {
args.push(ref);
@@ -1158,7 +1327,7 @@ export class Repository {
await this.run(args);
}
- async fetch(options: { remote?: string, ref?: string, all?: boolean, prune?: boolean } = {}): Promise {
+ async fetch(options: { remote?: string, ref?: string, all?: boolean, prune?: boolean, depth?: number } = {}): Promise {
const args = ['fetch'];
if (options.remote) {
@@ -1175,6 +1344,9 @@ export class Repository {
args.push('--prune');
}
+ if (typeof options.depth === 'number') {
+ args.push(`--depth=${options.depth}`);
+ }
try {
await this.run(args);
@@ -1189,9 +1361,13 @@ export class Repository {
}
}
- async pull(rebase?: boolean, remote?: string, branch?: string): Promise {
+ async pull(rebase?: boolean, remote?: string, branch?: string, options: PullOptions = {}): Promise {
const args = ['pull', '--tags'];
+ if (options.unshallow) {
+ args.push('--unshallow');
+ }
+
if (rebase) {
args.push('-r');
}
@@ -1263,16 +1439,33 @@ export class Repository {
}
}
+ async blame(path: string): Promise {
+ try {
+ const args = ['blame'];
+ args.push(path);
+
+ let result = await this.run(args);
+
+ return result.stdout.trim();
+ } catch (err) {
+ if (/^fatal: no such path/.test(err.stderr || '')) {
+ err.gitErrorCode = GitErrorCodes.NoPathFound;
+ }
+
+ throw err;
+ }
+ }
+
async createStash(message?: string, includeUntracked?: boolean): Promise {
try {
- const args = ['stash', 'save'];
+ const args = ['stash', 'push'];
if (includeUntracked) {
args.push('-u');
}
if (message) {
- args.push('--', message);
+ args.push('-m', message);
}
await this.run(args);
@@ -1368,7 +1561,7 @@ export class Repository {
throw new Error('Not in a branch');
}
- return { name: result.stdout.trim(), commit: void 0, type: RefType.Head };
+ return { name: result.stdout.trim(), commit: undefined, type: RefType.Head };
} catch (err) {
const result = await this.run(['rev-parse', 'HEAD']);
@@ -1376,7 +1569,7 @@ export class Repository {
throw new Error('Error parsing HEAD');
}
- return { name: void 0, commit: result.stdout.trim(), type: RefType.Head };
+ return { name: undefined, commit: result.stdout.trim(), type: RefType.Head };
}
}
@@ -1521,7 +1714,7 @@ export class Repository {
}
async getCommit(ref: string): Promise {
- const result = await this.run(['show', '-s', '--format=%H\n%P\n%B', ref]);
+ const result = await this.run(['show', '-s', `--format=${COMMIT_FORMAT}`, ref]);
return parseGitCommit(result.stdout) || Promise.reject('bad commit format');
}
diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts
index d188eea026e..2fac9e2a39f 100644
--- a/extensions/git/src/repository.ts
+++ b/extensions/git/src/repository.ts
@@ -13,7 +13,7 @@ import * as path from 'path';
import * as nls from 'vscode-nls';
import * as fs from 'fs';
import { StatusBarCommands } from './statusbar';
-import { Branch, Ref, Remote, RefType, GitErrorCodes, Status } from './api/git';
+import { Branch, Ref, Remote, RefType, GitErrorCodes, Status, LogOptions, Change } from './api/git';
const timeout = (millis: number) => new Promise(c => setTimeout(c, millis));
@@ -94,6 +94,7 @@ export class Resource implements SourceControlResourceState {
case Status.INDEX_COPIED: return Resource.Icons[theme].Copied;
case Status.UNTRACKED: return Resource.Icons[theme].Untracked;
case Status.IGNORED: return Resource.Icons[theme].Ignored;
+ case Status.INTENT_TO_ADD: return Resource.Icons[theme].Added;
case Status.BOTH_DELETED: return Resource.Icons[theme].Conflict;
case Status.ADDED_BY_US: return Resource.Icons[theme].Conflict;
case Status.DELETED_BY_THEM: return Resource.Icons[theme].Conflict;
@@ -116,6 +117,7 @@ export class Resource implements SourceControlResourceState {
case Status.INDEX_COPIED: return localize('index copied', "Index Copied");
case Status.UNTRACKED: return localize('untracked', "Untracked");
case Status.IGNORED: return localize('ignored', "Ignored");
+ case Status.INTENT_TO_ADD: return localize('intent to add', "Intent to Add");
case Status.BOTH_DELETED: return localize('both deleted', "Both Deleted");
case Status.ADDED_BY_US: return localize('added by us', "Added By Us");
case Status.DELETED_BY_THEM: return localize('deleted by them', "Deleted By Them");
@@ -166,6 +168,7 @@ export class Resource implements SourceControlResourceState {
case Status.MODIFIED:
return 'M';
case Status.INDEX_ADDED:
+ case Status.INTENT_TO_ADD:
return 'A';
case Status.INDEX_DELETED:
case Status.DELETED:
@@ -201,8 +204,9 @@ export class Resource implements SourceControlResourceState {
case Status.DELETED:
return new ThemeColor('gitDecoration.deletedResourceForeground');
case Status.INDEX_ADDED:
+ case Status.INTENT_TO_ADD:
return new ThemeColor('gitDecoration.addedResourceForeground');
- case Status.INDEX_RENAMED: // todo@joh - special color?
+ case Status.INDEX_RENAMED:
case Status.UNTRACKED:
return new ThemeColor('gitDecoration.untrackedResourceForeground');
case Status.IGNORED:
@@ -295,7 +299,9 @@ export const enum Operation {
GetObjectDetails = 'GetObjectDetails',
SubmoduleUpdate = 'SubmoduleUpdate',
RebaseContinue = 'RebaseContinue',
- Apply = 'Apply'
+ Apply = 'Apply',
+ Blame = 'Blame',
+ Log = 'Log',
}
function isReadOnly(operation: Operation): boolean {
@@ -643,18 +649,29 @@ export class Repository implements Disposable {
};
}
+ let lineNumber = 0;
let start = 0, end;
let match: RegExpExecArray | null;
const regex = /\r?\n/g;
while ((match = regex.exec(text)) && position > match.index) {
start = match.index + match[0].length;
+ lineNumber++;
}
end = match ? match.index : text.length;
const line = text.substring(start, end);
- const threshold = Math.max(config.get('inputValidationLength') || 72, 0) || 72;
+
+ let threshold = config.get('inputValidationLength', 50);
+
+ if (lineNumber === 0) {
+ const inputValidationSubjectLength = config.get('inputValidationSubjectLength', null);
+
+ if (inputValidationSubjectLength !== null) {
+ threshold = inputValidationSubjectLength;
+ }
+ }
if (line.length <= threshold) {
if (setting !== 'always') {
@@ -697,10 +714,18 @@ export class Repository implements Disposable {
return this.run(Operation.Config, () => this.repository.config('local', key));
}
+ getGlobalConfig(key: string): Promise {
+ return this.run(Operation.Config, () => this.repository.config('global', key));
+ }
+
setConfig(key: string, value: string): Promise {
return this.run(Operation.Config, () => this.repository.config('local', key, value));
}
+ log(options?: LogOptions): Promise {
+ return this.run(Operation.Log, () => this.repository.log(options));
+ }
+
@throttle
async status(): Promise {
await this.run(Operation.Status);
@@ -710,19 +735,31 @@ export class Repository implements Disposable {
return this.run(Operation.Diff, () => this.repository.diff(cached));
}
- diffWithHEAD(path: string): Promise {
+ diffWithHEAD(): Promise;
+ diffWithHEAD(path: string): Promise;
+ diffWithHEAD(path?: string | undefined): Promise;
+ diffWithHEAD(path?: string | undefined): Promise {
return this.run(Operation.Diff, () => this.repository.diffWithHEAD(path));
}
- diffWith(ref: string, path: string): Promise {
+ diffWith(ref: string): Promise;
+ diffWith(ref: string, path: string): Promise;
+ diffWith(ref: string, path?: string | undefined): Promise;
+ diffWith(ref: string, path?: string): Promise {
return this.run(Operation.Diff, () => this.repository.diffWith(ref, path));
}
- diffIndexWithHEAD(path: string): Promise {
+ diffIndexWithHEAD(): Promise;
+ diffIndexWithHEAD(path: string): Promise;
+ diffIndexWithHEAD(path?: string | undefined): Promise;
+ diffIndexWithHEAD(path?: string): Promise {
return this.run(Operation.Diff, () => this.repository.diffIndexWithHEAD(path));
}
- diffIndexWith(ref: string, path: string): Promise {
+ diffIndexWith(ref: string): Promise;
+ diffIndexWith(ref: string, path: string): Promise;
+ diffIndexWith(ref: string, path?: string | undefined): Promise;
+ diffIndexWith(ref: string, path?: string): Promise {
return this.run(Operation.Diff, () => this.repository.diffIndexWith(ref, path));
}
@@ -730,7 +767,10 @@ export class Repository implements Disposable {
return this.run(Operation.Diff, () => this.repository.diffBlobs(object1, object2));
}
- diffBetween(ref1: string, ref2: string, path: string): Promise {
+ diffBetween(ref1: string, ref2: string): Promise;
+ diffBetween(ref1: string, ref2: string, path: string): Promise;
+ diffBetween(ref1: string, ref2: string, path?: string | undefined): Promise;
+ diffBetween(ref1: string, ref2: string, path?: string): Promise {
return this.run(Operation.Diff, () => this.repository.diffBetween(ref1, ref2, path));
}
@@ -904,8 +944,8 @@ export class Repository implements Disposable {
await this.run(Operation.Fetch, () => this.repository.fetch({ all: true }));
}
- async fetch(remote?: string, ref?: string): Promise {
- await this.run(Operation.Fetch, () => this.repository.fetch({ remote, ref }));
+ async fetch(remote?: string, ref?: string, depth?: number): Promise {
+ await this.run(Operation.Fetch, () => this.repository.fetch({ remote, ref, depth }));
}
@throttle
@@ -918,18 +958,11 @@ export class Repository implements Disposable {
branch = `${head.upstream.name}`;
}
- const config = workspace.getConfiguration('git', Uri.file(this.root));
- const fetchOnPull = config.get('fetchOnPull');
-
- if (fetchOnPull) {
- await this.run(Operation.Pull, () => this.repository.pull(true));
- } else {
- await this.run(Operation.Pull, () => this.repository.pull(true, remote, branch));
- }
+ return this.pullFrom(true, remote, branch);
}
@throttle
- async pull(head?: Branch): Promise {
+ async pull(head?: Branch, unshallow?: boolean): Promise {
let remote: string | undefined;
let branch: string | undefined;
@@ -938,25 +971,22 @@ export class Repository implements Disposable {
branch = `${head.upstream.name}`;
}
- const config = workspace.getConfiguration('git', Uri.file(this.root));
- const fetchOnPull = config.get('fetchOnPull');
-
- if (fetchOnPull) {
- await this.run(Operation.Pull, () => this.repository.pull(false));
- } else {
- await this.run(Operation.Pull, () => this.repository.pull(false, remote, branch));
- }
+ return this.pullFrom(false, remote, branch, unshallow);
}
- async pullFrom(rebase?: boolean, remote?: string, branch?: string): Promise {
- const config = workspace.getConfiguration('git', Uri.file(this.root));
- const fetchOnPull = config.get('fetchOnPull');
+ async pullFrom(rebase?: boolean, remote?: string, branch?: string, unshallow?: boolean): Promise