| 475 | } |
| 476 | |
| 477 | inline bool is_include_directive_with_quotes(const std::string& source, |
| 478 | int line_num) { |
| 479 | // TODO: Check each find() for failure. |
| 480 | size_t beg = 0; |
| 481 | for (int i = 1; i < line_num; ++i) { |
| 482 | beg = source.find("\n", beg) + 1; |
| 483 | } |
| 484 | beg = source.find("include", beg) + 7; |
| 485 | beg = source.find_first_of("\"<", beg); |
| 486 | return source[beg] == '"'; |
| 487 | } |
| 488 | |
| 489 | inline std::string comment_out_code_line(int line_num, std::string source) { |
| 490 | size_t beg = 0; |