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

Function blankMetalAttributes

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

Source from the content-addressed store, hash-verified

1211const METAL_ATTRIBUTE_RE =
1212 /\[\[\s*[A-Za-z_]\w*(?:\s*\([^()\n]*\))?(?:\s*,\s*[A-Za-z_]\w*(?:\s*\([^()\n]*\))?)*\s*\]\]/g;
1213export function blankMetalAttributes(source: string): string {
1214 if (source.indexOf('[[') === -1) return source;
1215 return source.replace(METAL_ATTRIBUTE_RE, (m) => ' '.repeat(m.length));
1216}
1217
1218/**
1219 * 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