(source: string)
| 291 | * so C's heavier use of `struct TAG var;` never reaches it. |
| 292 | */ |
| 293 | export function blankCppExportMacros(source: string): string { |
| 294 | if (source.indexOf('class') === -1 && source.indexOf('struct') === -1) return source; |
| 295 | return source.replace( |
| 296 | /\b(class|struct)(\s+)([A-Z][A-Z0-9_]+)(?=\s+[A-Za-z_]\w*(?:\s+final)?\s*[:{])/g, |
| 297 | (_m, kw, ws, macro) => kw + ws + ' '.repeat(macro.length) |
| 298 | ); |
| 299 | } |
| 300 | |
| 301 | /** |
| 302 | * Blank a known inline-specifier macro sitting in front of a function's return |
no outgoing calls