diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-04-12 21:49:46 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-04-14 12:27:01 +0300 |
commit | 43a47ce352dc43662dc5a59123ce4823e9ba7189 (patch) | |
tree | 07565442388faaf32cc856e175dd8882ef427398 /mod/types-parsers.cxx | |
parent | f17ffcc3577014c89d5c4d1009d06ff0e3dabba4 (diff) |
Add support for random package ordering in build task module
Diffstat (limited to 'mod/types-parsers.cxx')
-rw-r--r-- | mod/types-parsers.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mod/types-parsers.cxx b/mod/types-parsers.cxx index 3868c32..fd087bc 100644 --- a/mod/types-parsers.cxx +++ b/mod/types-parsers.cxx @@ -217,5 +217,25 @@ namespace brep throw invalid_value (o, v, os.str ()); } } + + // Parse build_order. + // + void parser<build_order>:: + parse (build_order& x, bool& xs, scanner& s) + { + xs = true; + const char* o (s.next ()); + + if (!s.more ()) + throw missing_value (o); + + const string v (s.next ()); + if (v == "stable") + x = build_order::stable; + else if (v == "random") + x = build_order::random; + else + throw invalid_value (o, v); + } } } |