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

Function helperMemberNames

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

The names of the routines the project's helpers declare, lowercased, whatever type each helps.

(context: ResolutionContext)

Source from the content-addressed store, hash-verified

2113
2114/** The names of the routines the project's helpers declare, lowercased, whatever type each helps. */
2115function helperMemberNames(context: ResolutionContext): Set<string> {
2116 const m = memos(context);
2117 if (!m.helperNames) {
2118 const names = new Set<string>();
2119 for (const helper of context.iterateNodesByKind?.('class') ?? context.getNodesByKind('class')) {
2120 if (helper.language !== 'pascal' || !helperHead(helper)) continue;
2121 const owner = helper.qualifiedName.toLowerCase();
2122 for (const n of context.getNodesInFile(helper.filePath)) {
2123 if (isRoutine(n) && ownerOf(n) === owner) names.add(n.name.toLowerCase());
2124 }
2125 }
2126 m.helperNames = names;
2127 }
2128 return m.helperNames;
2129}
2130
2131/**
2132 * The project's helpers by the id of the class each helps: a class the

Callers 1

matchPascalHelperCallFunction · 0.85

Calls 8

memosFunction · 0.85
helperHeadFunction · 0.85
isRoutineFunction · 0.85
ownerOfFunction · 0.70
iterateNodesByKindMethod · 0.65
getNodesByKindMethod · 0.65
getNodesInFileMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected