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

Function decoratorsInSource

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

Source from the content-addressed store, hash-verified

2210
2211/** {@link decoratorsForFile} over source text — the test surface. */
2212export async function decoratorsInSource(source: string, language: Language, line: number): Promise<DefinitionDecorators | null> {
2213 if (!supportsBranchGuards(language)) return null;
2214 const tree = await parse(source, language);
2215 if (!tree) return null;
2216 try {
2217 return decoratorsInTree(tree.rootNode, source, line);
2218 } finally {
2219 tree.delete();
2220 }
2221}
2222
2223export function decoratorsInTree(root: SyntaxNode, source: string, line: number): DefinitionDecorators | null {
2224 const row = line - 1;

Callers 1

Calls 4

supportsBranchGuardsFunction · 0.85
decoratorsInTreeFunction · 0.85
parseFunction · 0.70
deleteMethod · 0.65

Tested by

no test coverage detected