aboutsummaryrefslogtreecommitdiff
path: root/bdep/types-parsers.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bdep/types-parsers.cxx')
-rw-r--r--bdep/types-parsers.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/bdep/types-parsers.cxx b/bdep/types-parsers.cxx
index 7707b3c..8f693fa 100644
--- a/bdep/types-parsers.cxx
+++ b/bdep/types-parsers.cxx
@@ -68,5 +68,22 @@ namespace bdep
xs = true;
parse_path (x, s);
}
+
+ void parser<stdout_format>::
+ parse (stdout_format& r, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (!s.more ())
+ throw missing_value (o);
+
+ string v (s.next ());
+
+ if (v == "lines") r = stdout_format::lines;
+ else if (v == "json") r = stdout_format::json;
+ else throw invalid_value (o, v);
+
+ xs = true;
+ }
}
}