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

Function callSiteInSource

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

Source from the content-addressed store, hash-verified

633
634/** {@link callSitesForFile} over source text — the test surface. */
635export async function callSiteInSource(
636 source: string,
637 language: Language,
638 line: number,
639 column: number | null
640): Promise<CallSiteText | null> {
641 if (!supportsBranchGuards(language)) return null;
642 const tree = await parse(source, language);
643 if (!tree) return null;
644 try {
645 return callSiteInTree(tree.rootNode, source, line, column);
646 } finally {
647 tree.delete();
648 }
649}
650
651/** The node holding a call's arguments: the `arguments` field, a container child, or Swift's `call_suffix` contents. */
652function argumentsOf(call: SyntaxNode): SyntaxNode | null {

Callers 1

siteAtFunction · 0.90

Calls 4

supportsBranchGuardsFunction · 0.85
callSiteInTreeFunction · 0.85
parseFunction · 0.70
deleteMethod · 0.65

Tested by 1

siteAtFunction · 0.72