|
|
|
@ -16,6 +16,13 @@ void cb::argparser::ArgumentParser::add_argument(const std::string &short_name,
|
|
|
|
throw std::runtime_error(error_message);
|
|
|
|
throw std::runtime_error(error_message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (mode == Mode::POSITIONAL) {
|
|
|
|
|
|
|
|
assert(short_name.empty() && "The name should be left empty if it's a positional argument!");
|
|
|
|
|
|
|
|
assert(name.empty() && "The name should be left empty if it's a positional argument!");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
assert(!name.empty() && "long name should never be empty!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ParseArgument argument{};
|
|
|
|
ParseArgument argument{};
|
|
|
|
argument.short_name = short_name;
|
|
|
|
argument.short_name = short_name;
|
|
|
|
argument.name = name;
|
|
|
|
argument.name = name;
|
|
|
|
|