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

Function memberThroughPath

src/resolution/pascal-scope.ts:519–524  ·  view source on GitHub ↗

* A dotted name: the method its receiver's declared type has; with * `holdsRoutine`, data that holds a routine too (a chain called with its * arguments, `Owner.Events.FOnChange(Self)`, see isProceduralData).

(path: string[], cls: Node | null, ref: UnresolvedRef, context: ResolutionContext, holdsRoutine = false)

Source from the content-addressed store, hash-verified

517 * arguments, `Owner.Events.FOnChange(Self)`, see isProceduralData).
518 */
519function memberThroughPath(path: string[], cls: Node | null, ref: UnresolvedRef, context: ResolutionContext, holdsRoutine = false): Found | null {
520 const last = memberAtPath(path, cls, ref, context);
521 if (!last) return null;
522 if (!isRoutine(last.node) && !(holdsRoutine && DATA_KINDS.has(last.node.kind) && isProceduralData(last.node, context))) return null;
523 return { node: last.node, resolvedBy: last.unit ? 'import' : 'instance-method', confidence: 0.9 };
524}
525
526/**
527 * What a dotted name's last link is declared as: a member of what the links

Callers 1

matchPascalParenlessRefFunction · 0.85

Calls 4

memberAtPathFunction · 0.85
isRoutineFunction · 0.85
isProceduralDataFunction · 0.85
hasMethod · 0.80

Tested by

no test coverage detected