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

Function matchCppCallChain

src/resolution/name-matcher.ts:885–894  ·  view source on GitHub ↗
(
  ref: UnresolvedRef,
  context: ResolutionContext,
)

Source from the content-addressed store, hash-verified

883 * produces no edge rather than a wrong one.
884 */
885export function matchCppCallChain(
886 ref: UnresolvedRef,
887 context: ResolutionContext,
888): ResolvedRef | null {
889 const m = ref.referenceName.match(/^(.+)\(\)\.(\w+)$/);
890 if (!m || !m[1] || !m[2]) return null;
891 const cls = resolveCppCallResultType(m[1], ref, context);
892 if (!cls) return null;
893 return resolveMethodOnType(cls, m[2], ref, context, 0.85, 'instance-method');
894}
895
896/**
897 * Resolve a `::`-scoped factory chain whose receiver is a scoped/static call —

Callers 1

matchReferenceFunction · 0.85

Calls 2

resolveCppCallResultTypeFunction · 0.85
resolveMethodOnTypeFunction · 0.85

Tested by

no test coverage detected