summaryrefslogtreecommitdiff
path: root/src/parameters_parser.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/parameters_parser.hh')
-rw-r--r--src/parameters_parser.hh10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/parameters_parser.hh b/src/parameters_parser.hh
index 6104376c..827eacf9 100644
--- a/src/parameters_parser.hh
+++ b/src/parameters_parser.hh
@@ -5,6 +5,7 @@
#include "id_map.hh"
#include "array_view.hh"
#include "flags.hh"
+#include "optional.hh"
#include "string.hh"
namespace Kakoune
@@ -79,12 +80,9 @@ struct ParametersParser
// boolean option.
ParametersParser(ParameterList params, const ParameterDesc& desc);
- // check if a named option (either string or boolean) is specified
- bool has_option(const String& name) const;
-
- // get a string option value, returns an empty string if the option
- // is not defined
- const String& option_value(const String& name) const;
+ // Return a valid optional if the switch was given, with
+ // a non empty StringView value if the switch took an argument.
+ Optional<StringView> get_switch(StringView name) const;
struct iterator : std::iterator<std::forward_iterator_tag, String>
{