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

Function callArgumentsInSource

src/graph/branch-guards.ts:417–431  ·  view source on GitHub ↗
(
  source: string,
  language: Language,
  line: number,
  column: number | null
)

Source from the content-addressed store, hash-verified

415
416/** {@link callArgumentsForFile} over source text — the test surface. */
417export async function callArgumentsInSource(
418 source: string,
419 language: Language,
420 line: number,
421 column: number | null
422): Promise<string | null> {
423 if (!supportsBranchGuards(language)) return null;
424 const tree = await parse(source, language);
425 if (!tree) return null;
426 try {
427 return callArgumentsInTree(tree.rootNode, source, line, column);
428 } finally {
429 tree.delete();
430 }
431}
432
433export function callArgumentsInTree(
434 root: SyntaxNode,

Callers 1

argsAtFunction · 0.90

Calls 4

supportsBranchGuardsFunction · 0.85
callArgumentsInTreeFunction · 0.85
parseFunction · 0.70
deleteMethod · 0.65

Tested by 1

argsAtFunction · 0.72