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

Function callNames

__tests__/rust-receiver-chains.test.ts:210–216  ·  view source on GitHub ↗
(body: string)

Source from the content-addressed store, hash-verified

208
209 /** The names of the `calls` references extraction records for `body`, a method body's statements, sorted. */
210 const callNames = (body: string): string[] => {
211 const source = `impl Svc {\n fn shapes(&self, x: &X) {\n${body}\n }\n}\n`;
212 return extractFromSource('shapes.rs', source, 'rust').unresolvedReferences
213 .filter((r) => r.referenceKind === 'calls')
214 .map((r) => r.referenceName)
215 .sort();
216 };
217
218 it('of fields and method calls on `self` or a name, calls written `name()`', () => {
219 expect(callNames('self.services.store.put("a");')).toEqual(['self.services.store.put']);

Callers 1

Calls 2

extractFromSourceFunction · 0.90
mapMethod · 0.80

Tested by

no test coverage detected