Skip to content

Commit a09c196

Browse files
committed
Rename createDocumentSymbol
It is now called `extractDocumentSymbolFromDeclaration`.
1 parent f23c6e6 commit a09c196

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/server.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ export function getDocumentSymbols(document: TextDocument): DocumentSymbol[] {
11921192
...declarations,
11931193
...whereClausesDeclarations,
11941194
...typeDeclarations,
1195-
].map((node) => createDocumentSymbol(node, document));
1195+
].map((node) => extractDocumentSymbolFromDeclaration(node, document));
11961196
}
11971197

11981198
function findNodesOfType(rootNode: SyntaxNode, type: string): SyntaxNode[] {
@@ -1221,11 +1221,12 @@ function findWhereClauseDeclarations(rootNode: SyntaxNode): SyntaxNode[] {
12211221
return declarations;
12221222
}
12231223

1224-
function createDocumentSymbol(
1224+
function extractDocumentSymbolFromDeclaration(
12251225
node: SyntaxNode,
12261226
document: TextDocument,
12271227
): DocumentSymbol {
12281228
let bindingNode: SyntaxNode | null | undefined = node.child(0);
1229+
12291230
// For normal declarations, the id is nested inside a pattern
12301231
if (node.type === "declaration") bindingNode = bindingNode?.child(0);
12311232

0 commit comments

Comments
 (0)