* The source with comments and string/char literals turned to spaces, line * endings kept. The macro scans below match on this, so a word in a comment or * a literal (`* NOTE: …` in a doc comment) is never blanked, and every offset * still lines up with the source.
(source: string)
| 731 | * still lines up with the source. |
| 732 | */ |
| 733 | function maskCppCommentsAndLiterals(source: string): string { |
| 734 | return source.replace(CPP_COMMENT_OR_LITERAL_RE, (m) => (m.includes('\n') || m.includes('\r') ? m.replace(/[^\r\n]/g, ' ') : ' '.repeat(m.length))); |
| 735 | } |
| 736 | |
| 737 | /** |
| 738 | * The code the macro scans below match on, at the source's offsets: comments |
no outgoing calls
no test coverage detected