| 46 | } |
| 47 | |
| 48 | void ConfigParser::error(std::string str) |
| 49 | { |
| 50 | if (atEnd()) |
| 51 | { |
| 52 | if (m_position != 0) |
| 53 | { |
| 54 | --m_position; |
| 55 | } |
| 56 | throw ParseError(std::move(str), m_lines[m_position].filename, -1); |
| 57 | } |
| 58 | else |
| 59 | { |
| 60 | throw ParseError(std::move(str), m_lines[m_position].filename, m_lines[m_position].line_no); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | void ConfigParser::parseLine(std::string line, std::string const& filename, int line_no) |
| 65 | { |
no test coverage detected