| 222 | } |
| 223 | |
| 224 | numeric parse_number(const std::string &str) |
| 225 | { |
| 226 | try { |
| 227 | if (str.find('.') != std::string::npos) |
| 228 | return std::stold(str); |
| 229 | else |
| 230 | return std::stoll(str); |
| 231 | } |
| 232 | catch (const std::exception &e) { |
| 233 | throw lang_error("Wrong literal format."); |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | garbage_collector<token_base> token_base::gc; |
| 238 |
no test coverage detected