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

Function memberTypesInSource

src/graph/branch-guards.ts:2306–2315  ·  view source on GitHub ↗
(source: string, language: Language, line: number)

Source from the content-addressed store, hash-verified

2304
2305/** {@link memberTypesForFile} over source text — the test surface. */
2306export async function memberTypesInSource(source: string, language: Language, line: number): Promise<Map<string, string>> {
2307 if (!supportsBranchGuards(language)) return new Map();
2308 const tree = await parse(source, language);
2309 if (!tree) return new Map();
2310 try {
2311 return memberTypesInTree(tree.rootNode, source, line);
2312 } finally {
2313 tree.delete();
2314 }
2315}
2316
2317const CLASS_BODY_TYPES: ReadonlySet<string> = new Set(['class_body', 'declaration_list', 'field_declaration_list']);
2318

Callers 1

Calls 4

supportsBranchGuardsFunction · 0.85
memberTypesInTreeFunction · 0.85
parseFunction · 0.70
deleteMethod · 0.65

Tested by

no test coverage detected