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

Function restore

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected