mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Merge pull request #867 from Microsoft/reAddColorizationFix
Restored semantic colorization fix
This commit is contained in:
commit
4ac3be092c
@ -4663,15 +4663,19 @@ module ts {
|
||||
else if (flags & SymbolFlags.Enum) {
|
||||
return ClassificationTypeNames.enumName;
|
||||
}
|
||||
else if (flags & SymbolFlags.Interface) {
|
||||
return ClassificationTypeNames.interfaceName;
|
||||
}
|
||||
else if (flags & SymbolFlags.TypeParameter) {
|
||||
return ClassificationTypeNames.typeParameterName;
|
||||
else if (meaningAtPosition & SemanticMeaning.Type) {
|
||||
if (flags & SymbolFlags.Interface) {
|
||||
return ClassificationTypeNames.interfaceName;
|
||||
}
|
||||
else if (flags & SymbolFlags.TypeParameter) {
|
||||
return ClassificationTypeNames.typeParameterName;
|
||||
}
|
||||
}
|
||||
else if (flags & SymbolFlags.Module) {
|
||||
return ClassificationTypeNames.moduleName;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function processNode(node: Node) {
|
||||
|
||||
@ -8,5 +8,4 @@
|
||||
//// Thing.toExponential();
|
||||
|
||||
var c = classification;
|
||||
// NOTE: this is *wrong*, but will be fixed shortly.
|
||||
verify.semanticClassificationsAre(c.interfaceName("Thing"), c.interfaceName("Thing"), c.interfaceName("Thing"));
|
||||
verify.semanticClassificationsAre(c.interfaceName("Thing"));
|
||||
12
tests/cases/fourslash/semanticClassification3.ts
Normal file
12
tests/cases/fourslash/semanticClassification3.ts
Normal file
@ -0,0 +1,12 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////declare module M {
|
||||
//// interface I {
|
||||
////
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////var M = { I: 10 };
|
||||
|
||||
var c = classification;
|
||||
verify.semanticClassificationsAre(c.moduleName("M"), c.interfaceName("I"), c.moduleName("M"));
|
||||
Loading…
x
Reference in New Issue
Block a user