init: simplify keyword_map
I've heard that keyword_map is too complex, in particular the tuple
and the pair in BuiltinFunctionMap, so this change removes a lot of
that complexity and, more importantly, better documents how all of
this works.
Test: boot, init unit tests
Change-Id: I74e5f9de7f2ec524cb6127bb9da2956b5f307f56
diff --git a/init/service_parser.h b/init/service_parser.h
index bca0739..98ab15a 100644
--- a/init/service_parser.h
+++ b/init/service_parser.h
@@ -45,7 +45,7 @@
private:
using OptionParser = Result<void> (ServiceParser::*)(std::vector<std::string>&& args);
- class OptionParserMap;
+ const KeywordMap<ServiceParser::OptionParser>& GetParserMap() const;
Result<void> ParseCapabilities(std::vector<std::string>&& args);
Result<void> ParseClass(std::vector<std::string>&& args);