diff options
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); + } } } |