mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-23 01:42:07 -06:00
Rudimentary support in language service
This commit is contained in:
parent
af00c718cc
commit
3cda261558
@ -235,6 +235,9 @@ module ts.NavigationBar {
|
||||
return createItem(node, getTextOfNode((<FunctionLikeDeclaration>node).name), ts.ScriptElementKind.functionElement);
|
||||
|
||||
case SyntaxKind.VariableDeclaration:
|
||||
if (isBindingPattern((<VariableDeclaration>node).name)) {
|
||||
break;
|
||||
}
|
||||
if (node.flags & NodeFlags.Const) {
|
||||
return createItem(node, getTextOfNode((<VariableDeclaration>node).name), ts.ScriptElementKind.constantElement);
|
||||
}
|
||||
|
||||
@ -712,6 +712,8 @@ module ts {
|
||||
// fall through
|
||||
case SyntaxKind.Constructor:
|
||||
case SyntaxKind.VariableStatement:
|
||||
case SyntaxKind.ObjectBindingPattern:
|
||||
case SyntaxKind.ArrayBindingPattern:
|
||||
case SyntaxKind.ModuleBlock:
|
||||
case SyntaxKind.FunctionBlock:
|
||||
forEachChild(node, visit);
|
||||
@ -724,6 +726,10 @@ module ts {
|
||||
}
|
||||
// fall through
|
||||
case SyntaxKind.VariableDeclaration:
|
||||
if (isBindingPattern((<VariableDeclaration>node).name)) {
|
||||
forEachChild((<VariableDeclaration>node).name, visit);
|
||||
break;
|
||||
}
|
||||
case SyntaxKind.EnumMember:
|
||||
case SyntaxKind.Property:
|
||||
namedDeclarations.push(<Declaration>node);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user