21 const auto &log = logger<LogArea::InputParser>();
23 std::istringstream input_stream(input);
24 std::vector<Line> lines;
29 while (std::getline(input_stream, line)) {
31 const auto hash_pos = line.find(
'#');
32 if (hash_pos != std::string::npos) {
34 line = line.substr(0, hash_pos);
36 if (line.find_first_not_of(
" \t") == std::string::npos) {
41 lines.emplace_back(line_number, std::move(line));
std::string trim(const std::string &s)
Strip leading and trailing whitespaces.
#define source_location
Hackery that is required to output the location in the source code where the log statement occurs...
build_vector_< Line > line_parser(const std::string &input)
Helper function for parsing particles.txt and decaymodes.txt.