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

Function includesByStem

src/resolution/cpp-includers.ts:101–112  ·  view source on GitHub ↗
(context: ResolutionContext, memo: Memo)

Source from the content-addressed store, hash-verified

99}
100
101function includesByStem(context: ResolutionContext, memo: Memo): Map<string, Include[]> {
102 if (memo.byStem) return memo.byStem;
103 const byStem = new Map<string, Include[]>();
104 for (const [name, includes] of includesByName(context, memo)) {
105 const stem = stemOf(name);
106 const list = byStem.get(stem);
107 if (list) list.push(...includes);
108 else byStem.set(stem, [...includes]);
109 }
110 memo.byStem = byStem;
111 return byStem;
112}
113
114/**
115 * Past this many, a project's `#include`s are left to the threads that ask

Callers 1

cppIncludedHeadersBesideFunction · 0.85

Calls 5

includesByNameFunction · 0.85
pushMethod · 0.80
stemOfFunction · 0.70
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected