(source: string)
| 1060 | 'gm' |
| 1061 | ); |
| 1062 | export function blankCppLeadingAttributeMacros(source: string): string { |
| 1063 | if (!/(?:^|\]\])[ \t]*[A-Z][A-Z0-9]*_[A-Z0-9_]*\s/m.test(source)) return source; |
| 1064 | const code = maskCppCode(source); |
| 1065 | const spans: Array<[number, number]> = []; |
| 1066 | const re = new RegExp(CPP_LEADING_ATTR_RE.source, 'gm'); |
| 1067 | let m: RegExpExecArray | null; |
| 1068 | while ((m = re.exec(code)) !== null) { |
| 1069 | const start = m.index + (m[1] as string).length; |
| 1070 | pushCppRunTokens(spans, m[2] as string, start); |
| 1071 | } |
| 1072 | return blankCppSpans(source, spans, code); |
| 1073 | } |
| 1074 | |
| 1075 | /** |
| 1076 | * Blank a known inline-specifier macro sitting in front of a function's return |
no test coverage detected