| 315 | } |
| 316 | |
| 317 | inline void CodePrinter::writeBlock (std::string_view text) |
| 318 | { |
| 319 | auto lineStart = text.begin(); |
| 320 | auto end = text.end(); |
| 321 | |
| 322 | for (auto i = lineStart; i != end; ++i) |
| 323 | { |
| 324 | if (*i == '\n') |
| 325 | { |
| 326 | auto nextLine = i + 1; |
| 327 | append ({ lineStart, nextLine }); |
| 328 | lineStart = nextLine; |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | append ({ lineStart, end }); |
| 333 | } |
| 334 | |
| 335 | inline void CodePrinter::trimTrailingBlankLines() |
| 336 | { |