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

Function body

__tests__/pascal-implementation-matching.test.ts:24–26  ·  view source on GitHub ↗
(source: string, node: Node)

Source from the content-addressed store, hash-verified

22const extract = (source: string) => extractFromSource('Demo.pas', source, 'pascal');
23const routines = (source: string) => extract(source).nodes.filter((n) => n.kind === 'method' || n.kind === 'function');
24function body(source: string, node: Node): string {
25 return source.split('\n').slice(node.startLine - 1, node.endLine).join('\n');
26}
27/** The qualified name of the routine a call of `name` is made from, or the file's name. */
28function callerOf(source: string, name: string): string | undefined {
29 const result = extract(source);

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected