| 211 | } |
| 212 | |
| 213 | void Parser::Imp::CmdSetNext(std::string s) { |
| 214 | std::string cmd, type, key, val; |
| 215 | std::stringstream b(s); |
| 216 | b >> std::skipws; |
| 217 | b >> cmd >> type >> key; |
| 218 | char c; |
| 219 | // Read first non-ws character |
| 220 | b >> c; |
| 221 | // Read remaining string |
| 222 | std::getline(b, val); |
| 223 | val = c + val; |
| 224 | |
| 225 | if (!var_.Int.Contains(key)) { |
| 226 | var_.Int.Set(key, 0); |
| 227 | } |
| 228 | int& id = var_.Int[key]; |
| 229 | var_.SetStr(type, key + std::to_string(id), val); |
| 230 | ++id; |
| 231 | } |
| 232 | |
| 233 | void Parser::Imp::CmdDel(std::string s) { |
| 234 | std::string cmd, key; |