From 43a47ce352dc43662dc5a59123ce4823e9ba7189 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 12 Apr 2023 21:49:46 +0300 Subject: Add support for random package ordering in build task module --- mod/types-parsers.cxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mod/types-parsers.cxx') 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:: + 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); + } } } -- cgit v1.1