aboutsummaryrefslogtreecommitdiff
path: root/mod/types-parsers.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-05-15 22:38:18 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-05-17 19:02:14 +0300
commit390af63a73b7d91c3c0b37089e88027b4f46a39f (patch)
tree4c373646625b6c54007a942c6e022dcb14fea4df /mod/types-parsers.cxx
parent9f5b820aec37ac0a929e074ae2c859229da33b0f (diff)
Add support for interactive parameter for task request
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>::