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

Function restore

src/extraction/languages/c-cpp.ts:1253–1263  ·  view source on GitHub ↗
(blanked)

Source from the content-addressed store, hash-verified

1251 return {
1252 source: masked,
1253 restore(blanked): string {
1254 // A length-changing rewrite cannot be restored at the original offsets.
1255 if (blanked === masked || blanked.length !== source.length) return source;
1256 const chars = blanked.split('');
1257 for (const { start, end } of spans) {
1258 for (let i = start; i < end; i++) {
1259 if (chars[i] === '\0') chars[i] = source[i] as string;
1260 }
1261 }
1262 return chars.join('');
1263 },
1264 };
1265}
1266

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected