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

Function blankMetalAttributes

src/extraction/languages/c-cpp.ts:1214–1217  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

1212const METAL_ATTRIBUTE_RE =
1213 /\[\[\s*[A-Za-z_]\w*(?:\s*\([^()\n]*\))?(?:\s*,\s*[A-Za-z_]\w*(?:\s*\([^()\n]*\))?)*\s*\]\]/g;
1214export function blankMetalAttributes(source: string): string {
1215 if (source.indexOf('[[') === -1) return source;
1216 return source.replace(METAL_ATTRIBUTE_RE, (m) => ' '.repeat(m.length));
1217}
1218
1219/**
1220 * Hide C++ raw literals from the offset-preserving preParse scans (#1505).

Callers 2

extraction.test.tsFile · 0.90
preParseCppSourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected