aboutsummaryrefslogtreecommitdiff
path: root/bbot/types-parsers.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bbot/types-parsers.cxx')
-rw-r--r--bbot/types-parsers.cxx21
1 files changed, 21 insertions, 0 deletions
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<standard_version>::
+ 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.
+ }
+ }
}
}