[typescript][semantic] add library modifier. Fixes #91090

This commit is contained in:
Martin Aeschlimann 2020-03-27 14:35:17 +01:00
parent e68ccf21bf
commit 40077f5ea9
6 changed files with 20 additions and 8 deletions

View File

@ -192,7 +192,7 @@
},
{
"name": "Support.constant",
"scope": "support.constant",
"scope": [ "support.constant", "support.variable"],
"settings": {
"fontStyle": "",
"foreground": "#eb939aff"

View File

@ -182,7 +182,10 @@
},
{
"name": "Library constant",
"scope": "support.constant",
"scope": [
"support.constant",
"support.variable"
],
"settings": {}
},
{

View File

@ -19,7 +19,7 @@
"jsonc-parser": "^2.2.1",
"rimraf": "^2.6.3",
"semver": "5.5.1",
"typescript-vscode-sh-plugin": "^0.6.10",
"typescript-vscode-sh-plugin": "^0.6.11",
"vscode-extension-telemetry": "0.1.1",
"vscode-nls": "^4.1.1"
},

View File

@ -151,6 +151,7 @@ tokenModifiers[TokenModifier.declaration] = 'declaration';
tokenModifiers[TokenModifier.readonly] = 'readonly';
tokenModifiers[TokenModifier.static] = 'static';
tokenModifiers[TokenModifier.local] = 'local';
tokenModifiers[TokenModifier.defaultLibrary] = 'defaultLibrary';
// make sure token types and modifiers are complete
if (tokenTypes.filter(t => !!t).length !== TokenType._) {

View File

@ -626,10 +626,10 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
typescript-vscode-sh-plugin@^0.6.10:
version "0.6.10"
resolved "https://registry.yarnpkg.com/typescript-vscode-sh-plugin/-/typescript-vscode-sh-plugin-0.6.10.tgz#f9fdac506a3adb698d52fd01723ec78e8a5fc09e"
integrity sha512-cYycpwLnYT2oS48tac+UvVRtIFHHTcHAz/g3N2HpYftuMEBvBcsGfe2SrlnrGCa1gMheTbo+twIHhsQu9ygdvg==
typescript-vscode-sh-plugin@^0.6.11:
version "0.6.11"
resolved "https://registry.yarnpkg.com/typescript-vscode-sh-plugin/-/typescript-vscode-sh-plugin-0.6.11.tgz#638fcc28ea5fad044b316d4305fe0925251ddf78"
integrity sha512-b3hVytj/EMFd2TgkF16l5NXEOQBRJ79e3k5+NWF8bxElLP6JsNEv/aXMFgNK07p8WcVkeE9PXC9YoURj2LWDpg==
uri-js@^4.2.2:
version "4.2.2"

View File

@ -533,7 +533,15 @@ function createDefaultTokenClassificationRegistry(): TokenClassificationRegistry
registerTokenStyleDefault('variable.readonly', [['variable.other.constant']]);
registerTokenStyleDefault('property.readonly', [['variable.other.constant.property']]);
registerTokenStyleDefault('type.defaultLibrary', [['support.type']]);
registerTokenStyleDefault('class.defaultLibrary', [['support.class']]);
registerTokenStyleDefault('interface.defaultLibrary', [['support.class']]);
registerTokenStyleDefault('variable.defaultLibrary', [['support.variable'], ['support.other.variable']]);
registerTokenStyleDefault('variable.defaultLibrary.readonly', [['support.constant']]);
registerTokenStyleDefault('property.defaultLibrary', [['support.variable.property']]);
registerTokenStyleDefault('property.defaultLibrary.readonly', [['support.constant.property']]);
registerTokenStyleDefault('function.defaultLibrary', [['support.function']]);
registerTokenStyleDefault('member.defaultLibrary', [['support.function']]);
return registry;
}