From 8c257da85cde2df8f459f0c7610445971fffb2a8 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 8 Mar 2022 21:12:57 +0300 Subject: Add JSON format support for --structured-result option and info meta operation --- libbuild2/types-parsers.hxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'libbuild2/types-parsers.hxx') diff --git a/libbuild2/types-parsers.hxx b/libbuild2/types-parsers.hxx index c64e0f6..aef00ca 100644 --- a/libbuild2/types-parsers.hxx +++ b/libbuild2/types-parsers.hxx @@ -9,7 +9,8 @@ #include -#include +#include // build2::build::cli namespace +#include namespace build2 { @@ -41,6 +42,19 @@ namespace build2 static void merge (dir_path& b, const dir_path& a) {b = a;} }; + + template <> + struct parser + { + static void + parse (structured_result_format&, bool&, scanner&); + + static void + merge (structured_result_format& b, const structured_result_format& a) + { + b = a; + } + }; } } } -- cgit v1.1