aboutsummaryrefslogtreecommitdiff
path: root/mod/types-parsers.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-03-12 12:48:15 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-03-13 12:16:35 +0300
commit962c725f9fba6b7b4803f31dbcd497169b237f57 (patch)
treedf9cf7e257323d81fd638b6d43f5ab060600ad3c /mod/types-parsers.cxx
parent351f89ffe10a2f3aadfbc3a80704b5954dc356ca (diff)
Change semantics for build-toolchain-email configuration option
Diffstat (limited to 'mod/types-parsers.cxx')
-rw-r--r--mod/types-parsers.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/mod/types-parsers.cxx b/mod/types-parsers.cxx
index 34a8bac..60d70d7 100644
--- a/mod/types-parsers.cxx
+++ b/mod/types-parsers.cxx
@@ -261,5 +261,27 @@ namespace brep
else
throw invalid_value (o, v);
}
+
+ // Parse build_email.
+ //
+ void parser<build_email>::
+ parse (build_email& 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 == "none")
+ x = build_email::none;
+ else if (v == "latest")
+ x = build_email::latest;
+ else if (v == "all")
+ x = build_email::all;
+ else
+ throw invalid_value (o, v);
+ }
}
}