aboutsummaryrefslogtreecommitdiff
path: root/mod/types-parsers.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'mod/types-parsers.cxx')
-rw-r--r--mod/types-parsers.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/mod/types-parsers.cxx b/mod/types-parsers.cxx
index fd087bc..34a8bac 100644
--- a/mod/types-parsers.cxx
+++ b/mod/types-parsers.cxx
@@ -13,6 +13,7 @@
using namespace std;
using namespace butl;
using namespace bpkg;
+using namespace bbot;
using namespace web::xhtml;
namespace brep
@@ -114,6 +115,29 @@ namespace brep
}
}
+ // Parse interactive_mode.
+ //
+ void parser<interactive_mode>::
+ parse (interactive_mode& x, bool& xs, scanner& s)
+ {
+ xs = true;
+ const char* o (s.next ());
+
+ if (!s.more ())
+ throw missing_value (o);
+
+ const string v (s.next ());
+
+ try
+ {
+ x = to_interactive_mode (v);
+ }
+ catch (const invalid_argument&)
+ {
+ throw invalid_value (o, v);
+ }
+ }
+
// Parse page_form.
//
void parser<page_form>::