From f5ab412da304e3970a6b5b3290758ed791c31881 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 3 May 2017 12:07:02 +0200 Subject: Pass toolchain name/version to controller --- bbot/types-parsers.cxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'bbot/types-parsers.cxx') diff --git a/bbot/types-parsers.cxx b/bbot/types-parsers.cxx index 1d0a250..af48ff7 100644 --- a/bbot/types-parsers.cxx +++ b/bbot/types-parsers.cxx @@ -47,5 +47,26 @@ namespace bbot xs = true; parse_path (x, s); } + + void parser:: + parse (standard_version& x, bool& xs, scanner& s) + { + xs = true; + const char* o (s.next ()); + + if (!s.more ()) + throw missing_value (o); + + const char* v (s.next ()); + + try + { + x = standard_version (v); + } + catch (const invalid_argument&) + { + throw invalid_value (o, v); //@@ Would be nice to include description. + } + } } } -- cgit v1.1