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

Function toInclude

src/resolution/cpp-includers.ts:64–65  ·  view source on GitHub ↗
(n: Pick<Node, 'id' | 'name' | 'filePath' | 'language' | 'startLine' | 'startColumn'>)

Source from the content-addressed store, hash-verified

62const dirOf = (filePath: string): string => filePath.slice(0, filePath.lastIndexOf('/') + 1);
63
64const toInclude = (n: Pick<Node, 'id' | 'name' | 'filePath' | 'language' | 'startLine' | 'startColumn'>): Include =>
65 ({ id: n.id, spec: n.name, file: n.filePath, language: n.language, line: n.startLine, column: n.startColumn });
66
67/** The indexed file an `#include` names, the way its include edge resolves it. */
68function includedFile(include: Include, context: ResolutionContext, memo: Memo): string | null {

Callers 2

includesByNameFunction · 0.85
cppIncludedFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected