| 80 | } |
| 81 | |
| 82 | std::vector<std::string> readlines(std::string path) { |
| 83 | std::ifstream infile(path); |
| 84 | std::vector<std::string> lines; |
| 85 | std::string line; |
| 86 | while (std::getline(infile, line)) { |
| 87 | std::istringstream iss(line); |
| 88 | |
| 89 | // Skip comments. |
| 90 | if (line[0] == '#' || (line[0] == '-' && line[1] == '-')) { |
| 91 | continue; |
| 92 | } |
| 93 | |
| 94 | lines.push_back(line); |
| 95 | } |
| 96 | return lines; |
| 97 | } |