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

Function blankMetalAttributes

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

Source from the content-addressed store, hash-verified

447const METAL_ATTRIBUTE_RE =
448 /\[\[\s*[A-Za-z_]\w*(?:\s*\([^()\n]*\))?(?:\s*,\s*[A-Za-z_]\w*(?:\s*\([^()\n]*\))?)*\s*\]\]/g;
449export function blankMetalAttributes(source: string): string {
450 if (source.indexOf('[[') === -1) return source;
451 return source.replace(METAL_ATTRIBUTE_RE, (m) => ' '.repeat(m.length));
452}
453
454/**
455 * Blank annotation-style macro invocations that decorate a declaration but carry

Callers 2

extraction.test.tsFile · 0.90
preParseCppSourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected