diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-03-08 21:12:57 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-03-11 12:57:10 +0300 |
commit | 8c257da85cde2df8f459f0c7610445971fffb2a8 (patch) | |
tree | 5ff670a42257ac6e1374da3ec0055a9ea348d871 /libbuild2/types-parsers.hxx | |
parent | a061301ab789d00027f29f389627792dccbe1748 (diff) |
Add JSON format support for --structured-result option and info meta operation
Diffstat (limited to 'libbuild2/types-parsers.hxx')
-rw-r--r-- | libbuild2/types-parsers.hxx | 16 |
1 files changed, 15 insertions, 1 deletions
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 <libbuild2/types.hxx> -#include <libbuild2/types-parsers.hxx> +#include <libbuild2/common-options.hxx> // build2::build::cli namespace +#include <libbuild2/options-types.hxx> namespace build2 { @@ -41,6 +42,19 @@ namespace build2 static void merge (dir_path& b, const dir_path& a) {b = a;} }; + + template <> + struct parser<structured_result_format> + { + static void + parse (structured_result_format&, bool&, scanner&); + + static void + merge (structured_result_format& b, const structured_result_format& a) + { + b = a; + } + }; } } } |