aboutsummaryrefslogtreecommitdiff
path: root/mod/types-parsers.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-04-12 21:49:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-04-14 12:27:01 +0300
commit43a47ce352dc43662dc5a59123ce4823e9ba7189 (patch)
tree07565442388faaf32cc856e175dd8882ef427398 /mod/types-parsers.cxx
parentf17ffcc3577014c89d5c4d1009d06ff0e3dabba4 (diff)
Add support for random package ordering in build task module
Diffstat (limited to 'mod/types-parsers.cxx')
-rw-r--r--mod/types-parsers.cxx20
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);
+ }
}
}