MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / symbols

Function symbols

__tests__/objcpp-cpp-items.test.ts:306–313  ·  view source on GitHub ↗

A file's symbols: "kind qualified-name first-last line", in the file's order.

(name: string, file: string)

Source from the content-addressed store, hash-verified

304
305 /** A file's symbols: "kind qualified-name first-last line", in the file's order. */
306 function symbols(name: string, file: string): string[] {
307 return graphs
308 .get(name)!
309 .getNodesInFile(file)
310 .filter((n) => n.kind !== 'file' && n.kind !== 'import')
311 .sort((a, b) => a.startLine - b.startLine || a.startColumn - b.startColumn)
312 .map((n) => `${n.kind} ${n.qualifiedName} ${n.startLine}-${n.endLine}`);
313 }
314
315 /** What a file's symbols call, reference and instantiate: "from -kind-> to", sorted. */
316 function links(name: string, file: string): string[] {

Callers 1

Calls 3

mapMethod · 0.80
getNodesInFileMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected