Selects a Classifier enum based on the type of the current argument
| 6401 | |
| 6402 | /// Selects a Classifier enum based on the type of the current argument |
| 6403 | detail::Classifier _recognize(const std::string ¤t, bool ignore_used_subcommands = true) const { |
| 6404 | std::string dummy1, dummy2; |
| 6405 | |
| 6406 | if (current == "--") return detail::Classifier::POSITIONAL_MARK; |
| 6407 | if (_valid_subcommand(current, ignore_used_subcommands)) return detail::Classifier::SUBCOMMAND; |
| 6408 | if (detail::split_long(current, dummy1, dummy2)) return detail::Classifier::LONG; |
| 6409 | if (detail::split_short(current, dummy1, dummy2)) { |
| 6410 | if (dummy1[0] >= '0' && dummy1[0] <= '9') { |
| 6411 | if (get_option_no_throw(std::string{'-', dummy1[0]}) == nullptr) { |
| 6412 | return detail::Classifier::NONE; |
| 6413 | } |
| 6414 | } |
| 6415 | return detail::Classifier::SHORT; |
| 6416 | } |
| 6417 | if ((allow_windows_style_options_) && (detail::split_windows_style(current, dummy1, dummy2))) |
| 6418 | return detail::Classifier::WINDOWS; |
| 6419 | if ((current == "++") && !name_.empty() && parent_ != nullptr) return detail::Classifier::SUBCOMMAND_TERMINATOR; |
| 6420 | return detail::Classifier::NONE; |
| 6421 | } |
| 6422 | |
| 6423 | // The parse function is now broken into several parts, and part of process |
| 6424 |
nothing calls this directly
no test coverage detected