From 369470005607b9501a769be0ae2a4c79c90bad84 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 8 Nov 2009 15:35:19 +0200 Subject: Implement usage generation Also migrate the CLI compiler usage handling to the auto-generated version. --- cli/context.hxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cli/context.hxx') diff --git a/cli/context.hxx b/cli/context.hxx index 1f2facb..194c008 100644 --- a/cli/context.hxx +++ b/cli/context.hxx @@ -20,6 +20,8 @@ using std::endl; +class generation_failed {}; + class context { public: @@ -36,6 +38,8 @@ public: semantics::cli_unit& unit; options_type const& options; + bool usage; + string const& inl; string const& opt_prefix; string const& opt_sep; @@ -59,6 +63,16 @@ public: string escape (string const&) const; + // Format the documentation string. + // + enum output_type + { + ot_plain + }; + + static string + format (string const&, output_type); + public: static string const& ename (semantics::nameable& n) -- cgit v1.1