#include "parser.h" #include #include Parser::Parser(std::string& input) { std::vector result; bool isString = false; std::string tmp; for (auto& c : input) { if (c == '"' && !isString) { isString = true; continue; } if (c == '"' && isString) { result.push_back(tmp); tmp = ""; isString = false; continue; } if (!isString) { std::string parsed(1, c); result.push_back(parsed); } else { tmp += c; } } }