From 9a7efb681331f77a3873bd9fb5694ad46338c0f7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 20 Jul 2022 15:44:44 -0400 Subject: cmArgumentParser: Offer private binding to cmParseArgumentsCommand The `keywordsMissingValue` argument to `Parse()` is now needed only for the `cmake_parse_arguments` result `_KEYWORDS_MISSING_VALUES`. Offer its implementation a private binding for this. Our internal clients can use `ArgumentParser::NonEmpty<>` and friends to enforce the presence of values. --- Source/cmArgumentParser.cxx | 3 +++ Source/cmArgumentParser.h | 11 +++++++++++ Source/cmParseArgumentsCommand.cxx | 9 ++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Source/cmArgumentParser.cxx b/Source/cmArgumentParser.cxx index 25d5c68..fcced96 100644 --- a/Source/cmArgumentParser.cxx +++ b/Source/cmArgumentParser.cxx @@ -116,6 +116,9 @@ void Instance::FinishKeyword() if (this->KeywordsMissingValue != nullptr) { this->KeywordsMissingValue->emplace_back(this->Keyword); } + if (this->Bindings.KeywordMissingValue) { + this->Bindings.KeywordMissingValue(*this, this->Keyword); + } } } diff --git a/Source/cmArgumentParser.h b/Source/cmArgumentParser.h index 8fda8b7..ae3a000 100644 --- a/Source/cmArgumentParser.h +++ b/Source/cmArgumentParser.h @@ -64,6 +64,7 @@ AsParseResultPtr(Result&) class Instance; using KeywordAction = std::function; +using KeywordNameAction = std::function; // using KeywordActionMap = cm::flat_map; class KeywordActionMap @@ -79,6 +80,7 @@ class ActionMap { public: KeywordActionMap Keywords; + KeywordNameAction KeywordMissingValue; }; class Base @@ -100,6 +102,12 @@ public: assert(inserted); static_cast(inserted); } + + void BindKeywordMissingValue(KeywordNameAction action) + { + assert(!this->Bindings.KeywordMissingValue); + this->Bindings.KeywordMissingValue = std::move(action); + } }; class Instance @@ -233,6 +241,9 @@ public: } protected: + using Base::Instance; + using Base::BindKeywordMissingValue; + template bool Bind(cm::string_view name, T& ref) { diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index 31538b6..7e19566 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -48,6 +48,12 @@ using options_set = std::set; struct UserArgumentParser : public cmArgumentParser { + void BindKeywordsMissingValue(std::vector& ref) + { + this->cmArgumentParser::BindKeywordMissingValue( + [&ref](Instance&, cm::string_view arg) { ref.emplace_back(arg); }); + } + template void Bind(std::vector const& names, std::map& ref, H duplicateKey) @@ -211,8 +217,9 @@ bool cmParseArgumentsCommand(std::vector const& args, } std::vector keywordsMissingValues; + parser.BindKeywordsMissingValue(keywordsMissingValues); - parser.Parse(list, &unparsed, &keywordsMissingValues); + parser.Parse(list, &unparsed); PassParsedArguments( prefix, status.GetMakefile(), options, singleValArgs, multiValArgs, -- cgit v0.12 From f95a5832c7ce6e88bd623e818471fa8c23fa77f4 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 20 Jul 2022 15:52:45 -0400 Subject: cmArgumentParser: Drop unused keywordsMissingValue argument to Parse() All clients have been converted to encoding this requirement in their bindings. --- Source/CTest/cmCTestHandlerCommand.cxx | 3 +-- Source/cmArgumentParser.cxx | 3 --- Source/cmArgumentParser.h | 13 +++---------- Source/cmFileCommand.cxx | 5 ++--- Tests/CMakeLib/testArgumentParser.cxx | 24 +++++++----------------- 5 files changed, 13 insertions(+), 35 deletions(-) diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx index af365ad..528115e 100644 --- a/Source/CTest/cmCTestHandlerCommand.cxx +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -83,8 +83,7 @@ bool cmCTestHandlerCommand::InitialPass(std::vector const& args, // Process input arguments. std::vector unparsedArguments; std::vector parsedKeywords; - this->Parse(args, &unparsedArguments, /*keywordsMissingValue=*/nullptr, - &parsedKeywords); + this->Parse(args, &unparsedArguments, &parsedKeywords); this->CheckArguments(); std::sort(parsedKeywords.begin(), parsedKeywords.end()); diff --git a/Source/cmArgumentParser.cxx b/Source/cmArgumentParser.cxx index fcced96..fafae13 100644 --- a/Source/cmArgumentParser.cxx +++ b/Source/cmArgumentParser.cxx @@ -113,9 +113,6 @@ void Instance::FinishKeyword() this->ParseResults->AddKeywordError(this->Keyword, " missing required value\n"); } - if (this->KeywordsMissingValue != nullptr) { - this->KeywordsMissingValue->emplace_back(this->Keyword); - } if (this->Bindings.KeywordMissingValue) { this->Bindings.KeywordMissingValue(*this, this->Keyword); } diff --git a/Source/cmArgumentParser.h b/Source/cmArgumentParser.h index ae3a000..70deaa6 100644 --- a/Source/cmArgumentParser.h +++ b/Source/cmArgumentParser.h @@ -115,13 +115,11 @@ class Instance public: Instance(ActionMap const& bindings, ParseResult* parseResult, std::vector* unparsedArguments, - std::vector* keywordsMissingValue, std::vector* parsedKeywords, void* result = nullptr) : Bindings(bindings) , ParseResults(parseResult) , UnparsedArguments(unparsedArguments) - , KeywordsMissingValue(keywordsMissingValue) , ParsedKeywords(parsedKeywords) , Result(result) { @@ -157,7 +155,6 @@ private: ActionMap const& Bindings; ParseResult* ParseResults = nullptr; std::vector* UnparsedArguments = nullptr; - std::vector* KeywordsMissingValue = nullptr; std::vector* ParsedKeywords = nullptr; void* Result = nullptr; @@ -193,25 +190,22 @@ public: template bool Parse(Result& result, Range const& args, std::vector* unparsedArguments, - std::vector* keywordsMissingValue = nullptr, std::vector* parsedKeywords = nullptr) const { using ArgumentParser::AsParseResultPtr; ParseResult* parseResultPtr = AsParseResultPtr(result); Instance instance(this->Bindings, parseResultPtr, unparsedArguments, - keywordsMissingValue, parsedKeywords, &result); + parsedKeywords, &result); instance.Parse(args); return parseResultPtr ? static_cast(*parseResultPtr) : true; } template Result Parse(Range const& args, std::vector* unparsedArguments, - std::vector* keywordsMissingValue = nullptr, std::vector* parsedKeywords = nullptr) const { Result result; - this->Parse(result, args, unparsedArguments, keywordsMissingValue, - parsedKeywords); + this->Parse(result, args, unparsedArguments, parsedKeywords); return result; } }; @@ -230,12 +224,11 @@ public: template ParseResult Parse( Range const& args, std::vector* unparsedArguments, - std::vector* keywordsMissingValue = nullptr, std::vector* parsedKeywords = nullptr) const { ParseResult parseResult; Instance instance(this->Bindings, &parseResult, unparsedArguments, - keywordsMissingValue, parsedKeywords); + parsedKeywords); instance.Parse(args); return parseResult; } diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index c7ba424..987f40e 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2498,9 +2498,8 @@ bool HandleGenerateCommand(std::vector const& args, std::vector unparsedArguments; std::vector parsedKeywords; - Arguments const arguments = - parser.Parse(cmMakeRange(args).advance(1), &unparsedArguments, - /*keywordsMissingValue=*/nullptr, &parsedKeywords); + Arguments const arguments = parser.Parse( + cmMakeRange(args).advance(1), &unparsedArguments, &parsedKeywords); if (arguments.MaybeReportError(status.GetMakefile())) { return true; diff --git a/Tests/CMakeLib/testArgumentParser.cxx b/Tests/CMakeLib/testArgumentParser.cxx index f0ace50..9db7936 100644 --- a/Tests/CMakeLib/testArgumentParser.cxx +++ b/Tests/CMakeLib/testArgumentParser.cxx @@ -63,14 +63,10 @@ std::initializer_list const args = { }; bool verifyResult(Result const& result, - std::vector const& unparsedArguments, - std::vector const& keywordsMissingValue) + std::vector const& unparsedArguments) { static std::vector const foobar = { "foo", "bar" }; static std::vector const barfoo = { "bar", "foo" }; - static std::vector const missing = { "STRING_1"_s, - "LIST_1"_s, - "LIST_4"_s }; static std::map const keywordErrors = { { "STRING_1"_s, " missing required value\n" }, { "LIST_1"_s, " missing required value\n" }, @@ -117,7 +113,6 @@ bool verifyResult(Result const& result, ASSERT_TRUE(unparsedArguments.size() == 1); ASSERT_TRUE(unparsedArguments[0] == "bar"); - ASSERT_TRUE(keywordsMissingValue == missing); ASSERT_TRUE(result.GetKeywordErrors().size() == keywordErrors.size()); for (auto const& ke : result.GetKeywordErrors()) { @@ -133,7 +128,6 @@ bool testArgumentParserDynamic() { Result result; std::vector unparsedArguments; - std::vector keywordsMissingValue; static_cast(result) = cmArgumentParser{} @@ -153,9 +147,9 @@ bool testArgumentParserDynamic() .Bind("MULTI_2"_s, result.Multi2) .Bind("MULTI_3"_s, result.Multi3) .Bind("MULTI_4"_s, result.Multi4) - .Parse(args, &unparsedArguments, &keywordsMissingValue); + .Parse(args, &unparsedArguments); - return verifyResult(result, unparsedArguments, keywordsMissingValue); + return verifyResult(result, unparsedArguments); } static auto const parserStatic = // @@ -181,20 +175,16 @@ static auto const parserStatic = // bool testArgumentParserStatic() { std::vector unparsedArguments; - std::vector keywordsMissingValue; - Result const result = - parserStatic.Parse(args, &unparsedArguments, &keywordsMissingValue); - return verifyResult(result, unparsedArguments, keywordsMissingValue); + Result const result = parserStatic.Parse(args, &unparsedArguments); + return verifyResult(result, unparsedArguments); } bool testArgumentParserStaticBool() { std::vector unparsedArguments; - std::vector keywordsMissingValue; Result result; - ASSERT_TRUE(parserStatic.Parse(result, args, &unparsedArguments, - &keywordsMissingValue) == false); - return verifyResult(result, unparsedArguments, keywordsMissingValue); + ASSERT_TRUE(parserStatic.Parse(result, args, &unparsedArguments) == false); + return verifyResult(result, unparsedArguments); } } // namespace -- cgit v0.12 From f7e81802f2fd3996983376dc2c3d638fdf35f396 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 20 Jul 2022 15:15:51 -0400 Subject: cmArgumentParser: Offer binding for list of parsed keywords Some clients ask for this list in their `Parse()` call. Offer them a way to express this request as a binding. --- Source/cmArgumentParser.cxx | 3 +++ Source/cmArgumentParser.h | 24 ++++++++++++++++++++++++ Tests/CMakeLib/testArgumentParser.cxx | 23 +++++++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/Source/cmArgumentParser.cxx b/Source/cmArgumentParser.cxx index fafae13..d4a3c8a 100644 --- a/Source/cmArgumentParser.cxx +++ b/Source/cmArgumentParser.cxx @@ -86,6 +86,9 @@ void Instance::Consume(cm::string_view arg) if (this->ParsedKeywords != nullptr) { this->ParsedKeywords->emplace_back(it->first); } + if (this->Bindings.ParsedKeyword) { + this->Bindings.ParsedKeyword(*this, it->first); + } it->second(*this); return; } diff --git a/Source/cmArgumentParser.h b/Source/cmArgumentParser.h index 70deaa6..7e219ae 100644 --- a/Source/cmArgumentParser.h +++ b/Source/cmArgumentParser.h @@ -81,6 +81,7 @@ class ActionMap public: KeywordActionMap Keywords; KeywordNameAction KeywordMissingValue; + KeywordNameAction ParsedKeyword; }; class Base @@ -103,6 +104,12 @@ public: static_cast(inserted); } + void BindParsedKeyword(KeywordNameAction action) + { + assert(!this->Bindings.ParsedKeyword); + this->Bindings.ParsedKeyword = std::move(action); + } + void BindKeywordMissingValue(KeywordNameAction action) { assert(!this->Bindings.KeywordMissingValue); @@ -187,6 +194,16 @@ public: return *this; } + cmArgumentParser& BindParsedKeywords( + std::vector Result::*member) + { + this->Base::BindParsedKeyword( + [member](Instance& instance, cm::string_view arg) { + (static_cast(instance.Result)->*member).emplace_back(arg); + }); + return *this; + } + template bool Parse(Result& result, Range const& args, std::vector* unparsedArguments, @@ -221,6 +238,13 @@ public: return *this; } + cmArgumentParser& BindParsedKeywords(std::vector& ref) + { + this->Base::BindParsedKeyword( + [&ref](Instance&, cm::string_view arg) { ref.emplace_back(arg); }); + return *this; + } + template ParseResult Parse( Range const& args, std::vector* unparsedArguments, diff --git a/Tests/CMakeLib/testArgumentParser.cxx b/Tests/CMakeLib/testArgumentParser.cxx index 9db7936..5460356 100644 --- a/Tests/CMakeLib/testArgumentParser.cxx +++ b/Tests/CMakeLib/testArgumentParser.cxx @@ -38,6 +38,8 @@ struct Result : public ArgumentParser::ParseResult std::vector> Multi2; cm::optional>> Multi3; cm::optional>> Multi4; + + std::vector ParsedKeywords; }; std::initializer_list const args = { @@ -67,6 +69,23 @@ bool verifyResult(Result const& result, { static std::vector const foobar = { "foo", "bar" }; static std::vector const barfoo = { "bar", "foo" }; + static std::vector const parsedKeywords = { + /* clang-format off */ + "OPTION_1", + "STRING_1", + "STRING_2", + "STRING_4", + "LIST_1", + "LIST_2", + "LIST_3", + "LIST_3", + "LIST_4", + "LIST_6", + "MULTI_2", + "MULTI_3", + "MULTI_3", + /* clang-format on */ + }; static std::map const keywordErrors = { { "STRING_1"_s, " missing required value\n" }, { "LIST_1"_s, " missing required value\n" }, @@ -114,6 +133,8 @@ bool verifyResult(Result const& result, ASSERT_TRUE(unparsedArguments.size() == 1); ASSERT_TRUE(unparsedArguments[0] == "bar"); + ASSERT_TRUE(result.ParsedKeywords == parsedKeywords); + ASSERT_TRUE(result.GetKeywordErrors().size() == keywordErrors.size()); for (auto const& ke : result.GetKeywordErrors()) { auto const ki = keywordErrors.find(ke.first); @@ -147,6 +168,7 @@ bool testArgumentParserDynamic() .Bind("MULTI_2"_s, result.Multi2) .Bind("MULTI_3"_s, result.Multi3) .Bind("MULTI_4"_s, result.Multi4) + .BindParsedKeywords(result.ParsedKeywords) .Parse(args, &unparsedArguments); return verifyResult(result, unparsedArguments); @@ -170,6 +192,7 @@ static auto const parserStatic = // .Bind("MULTI_2"_s, &Result::Multi2) .Bind("MULTI_3"_s, &Result::Multi3) .Bind("MULTI_4"_s, &Result::Multi4) + .BindParsedKeywords(&Result::ParsedKeywords) /* keep semicolon on own line */; bool testArgumentParserStatic() -- cgit v0.12 From 6ecd741b5ff1931e2f1381479633ceb6ddc47ce6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 20 Jul 2022 15:17:57 -0400 Subject: cmFileCommand: Capture list of parsed keywords via binding --- Source/cmFileCommand.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 987f40e..330d991 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2482,6 +2482,7 @@ bool HandleGenerateCommand(std::vector const& args, bool NoSourcePermissions = false; bool UseSourcePermissions = false; ArgumentParser::NonEmpty> FilePermissions; + std::vector ParsedKeywords; }; static auto const parser = @@ -2494,12 +2495,12 @@ bool HandleGenerateCommand(std::vector const& args, .Bind("NO_SOURCE_PERMISSIONS"_s, &Arguments::NoSourcePermissions) .Bind("USE_SOURCE_PERMISSIONS"_s, &Arguments::UseSourcePermissions) .Bind("FILE_PERMISSIONS"_s, &Arguments::FilePermissions) - .Bind("NEWLINE_STYLE"_s, &Arguments::NewLineStyle); + .Bind("NEWLINE_STYLE"_s, &Arguments::NewLineStyle) + .BindParsedKeywords(&Arguments::ParsedKeywords); std::vector unparsedArguments; - std::vector parsedKeywords; - Arguments const arguments = parser.Parse( - cmMakeRange(args).advance(1), &unparsedArguments, &parsedKeywords); + Arguments const arguments = + parser.Parse(cmMakeRange(args).advance(1), &unparsedArguments); if (arguments.MaybeReportError(status.GetMakefile())) { return true; @@ -2510,7 +2511,7 @@ bool HandleGenerateCommand(std::vector const& args, return false; } - if (!arguments.Output || parsedKeywords[0] != "OUTPUT"_s) { + if (!arguments.Output || arguments.ParsedKeywords[0] != "OUTPUT"_s) { status.SetError("GENERATE requires OUTPUT as first option."); return false; } @@ -2520,8 +2521,8 @@ bool HandleGenerateCommand(std::vector const& args, status.SetError("GENERATE requires INPUT or CONTENT option."); return false; } - const bool inputIsContent = parsedKeywords[1] == "CONTENT"_s; - if (!inputIsContent && parsedKeywords[1] == "INPUT") { + const bool inputIsContent = arguments.ParsedKeywords[1] == "CONTENT"_s; + if (!inputIsContent && arguments.ParsedKeywords[1] == "INPUT") { status.SetError("Unknown argument to GENERATE subcommand."); } std::string const& input = -- cgit v0.12 From 98cf623821cd5bf31e0afc47e7c6362c10bfeee2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 20 Jul 2022 15:19:13 -0400 Subject: cmCTestHandlerCommand: Capture list of parsed keywords via binding --- Source/CTest/cmCTestHandlerCommand.cxx | 11 ++++++----- Source/CTest/cmCTestHandlerCommand.h | 3 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx index 528115e..be952cd 100644 --- a/Source/CTest/cmCTestHandlerCommand.cxx +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -82,13 +82,13 @@ bool cmCTestHandlerCommand::InitialPass(std::vector const& args, // Process input arguments. std::vector unparsedArguments; - std::vector parsedKeywords; - this->Parse(args, &unparsedArguments, &parsedKeywords); + this->Parse(args, &unparsedArguments); this->CheckArguments(); - std::sort(parsedKeywords.begin(), parsedKeywords.end()); - auto it = std::adjacent_find(parsedKeywords.begin(), parsedKeywords.end()); - if (it != parsedKeywords.end()) { + std::sort(this->ParsedKeywords.begin(), this->ParsedKeywords.end()); + auto it = std::adjacent_find(this->ParsedKeywords.begin(), + this->ParsedKeywords.end()); + if (it != this->ParsedKeywords.end()) { this->Makefile->IssueMessage( MessageType::FATAL_ERROR, cmStrCat("Called with more than one value for ", *it)); @@ -232,6 +232,7 @@ void cmCTestHandlerCommand::ProcessAdditionalValues(cmCTestGenericHandler*) void cmCTestHandlerCommand::BindArguments() { + this->BindParsedKeywords(this->ParsedKeywords); this->Bind("APPEND"_s, this->Append); this->Bind("QUIET"_s, this->Quiet); this->Bind("RETURN_VALUE"_s, this->ReturnValue); diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h index 31942c8..ed6d9af 100644 --- a/Source/CTest/cmCTestHandlerCommand.h +++ b/Source/CTest/cmCTestHandlerCommand.h @@ -7,6 +7,8 @@ #include #include +#include + #include "cmArgumentParser.h" #include "cmCTestCommand.h" @@ -44,6 +46,7 @@ protected: virtual void BindArguments(); virtual void CheckArguments(); + std::vector ParsedKeywords; bool Append = false; bool Quiet = false; std::string CaptureCMakeError; -- cgit v0.12 From 2eba10c5ee0e20cee5bbcc43fbb29eee0529e8e9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 20 Jul 2022 15:20:10 -0400 Subject: cmArgumentParser: Drop unused parsedKeywords argument to Parse() All clients have been ported to use a binding instead. --- Source/cmArgumentParser.cxx | 3 --- Source/cmArgumentParser.h | 25 +++++++++---------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/Source/cmArgumentParser.cxx b/Source/cmArgumentParser.cxx index d4a3c8a..4379b29 100644 --- a/Source/cmArgumentParser.cxx +++ b/Source/cmArgumentParser.cxx @@ -83,9 +83,6 @@ void Instance::Consume(cm::string_view arg) if (it != this->Bindings.Keywords.end()) { this->FinishKeyword(); this->Keyword = it->first; - if (this->ParsedKeywords != nullptr) { - this->ParsedKeywords->emplace_back(it->first); - } if (this->Bindings.ParsedKeyword) { this->Bindings.ParsedKeyword(*this, it->first); } diff --git a/Source/cmArgumentParser.h b/Source/cmArgumentParser.h index 7e219ae..33b8fff 100644 --- a/Source/cmArgumentParser.h +++ b/Source/cmArgumentParser.h @@ -121,13 +121,10 @@ class Instance { public: Instance(ActionMap const& bindings, ParseResult* parseResult, - std::vector* unparsedArguments, - std::vector* parsedKeywords, - void* result = nullptr) + std::vector* unparsedArguments, void* result = nullptr) : Bindings(bindings) , ParseResults(parseResult) , UnparsedArguments(unparsedArguments) - , ParsedKeywords(parsedKeywords) , Result(result) { } @@ -162,7 +159,6 @@ private: ActionMap const& Bindings; ParseResult* ParseResults = nullptr; std::vector* UnparsedArguments = nullptr; - std::vector* ParsedKeywords = nullptr; void* Result = nullptr; cm::string_view Keyword; @@ -206,23 +202,22 @@ public: template bool Parse(Result& result, Range const& args, - std::vector* unparsedArguments, - std::vector* parsedKeywords = nullptr) const + std::vector* unparsedArguments) const { using ArgumentParser::AsParseResultPtr; ParseResult* parseResultPtr = AsParseResultPtr(result); Instance instance(this->Bindings, parseResultPtr, unparsedArguments, - parsedKeywords, &result); + &result); instance.Parse(args); return parseResultPtr ? static_cast(*parseResultPtr) : true; } template - Result Parse(Range const& args, std::vector* unparsedArguments, - std::vector* parsedKeywords = nullptr) const + Result Parse(Range const& args, + std::vector* unparsedArguments) const { Result result; - this->Parse(result, args, unparsedArguments, parsedKeywords); + this->Parse(result, args, unparsedArguments); return result; } }; @@ -246,13 +241,11 @@ public: } template - ParseResult Parse( - Range const& args, std::vector* unparsedArguments, - std::vector* parsedKeywords = nullptr) const + ParseResult Parse(Range const& args, + std::vector* unparsedArguments) const { ParseResult parseResult; - Instance instance(this->Bindings, &parseResult, unparsedArguments, - parsedKeywords); + Instance instance(this->Bindings, &parseResult, unparsedArguments); instance.Parse(args); return parseResult; } -- cgit v0.12