In getModifierOccurrences, support additional container kinds (#18947)

This commit is contained in:
Andy authored and GitHub committed 2017-10-04 09:52:51 -07:00
1 parent fe9129b1ab
commit 6617819bf3
2 files changed
+25 -1

No files matched your search

+4 -1
View File
@@ -302,12 +302,15 @@ namespace ts.DocumentHighlights {
switch (container.kind) {
case SyntaxKind.ModuleBlock:
case SyntaxKind.SourceFile:
case SyntaxKind.Block:
case SyntaxKind.CaseClause:
case SyntaxKind.DefaultClause:
// Container is either a class declaration or the declaration is a classDeclaration
if (modifierFlag & ModifierFlags.Abstract) {
nodes = [...(<ClassDeclaration>declaration).members, declaration];
}
else {
nodes = (<Block>container).statements;
nodes = (<ModuleBlock | SourceFile | Block | CaseClause | DefaultClause>container).statements;
}
break;
case SyntaxKind.Constructor: