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

Function blankMetalAttributes

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

Source from the content-addressed store, hash-verified

437const METAL_ATTRIBUTE_RE =
438 /\[\[\s*[A-Za-z_]\w*(?:\s*\([^()\n]*\))?(?:\s*,\s*[A-Za-z_]\w*(?:\s*\([^()\n]*\))?)*\s*\]\]/g;
439export function blankMetalAttributes(source: string): string {
440 if (source.indexOf('[[') === -1) return source;
441 return source.replace(METAL_ATTRIBUTE_RE, (m) => ' '.repeat(m.length));
442}
443
444/**
445 * 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