From a89ee85a4b94a57e996a233c9d21679d1e1217a9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Feb 2016 13:33:09 +0200 Subject: Add support for variable expansion (\$var$) in doc strings --- cli/context.hxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cli/context.hxx') diff --git a/cli/context.hxx b/cli/context.hxx index b33bfef..9f10a00 100644 --- a/cli/context.hxx +++ b/cli/context.hxx @@ -127,7 +127,7 @@ public: // If para is true, start a new paragraph. // string - format (output_type, string const&, bool para); + format (semantics::scope&, output_type, string const&, bool para); void format_line (output_type, string&, const char*, size_t); @@ -146,6 +146,13 @@ public: return substitute (s, unit, p); } + // Substitute doc variable expansions (\$var$). Note that it leaves escapes + // (\\$) as is. Return true if any substitutions have been made, in which + // case result will contain the expansion result. + // + bool + substitute (semantics::scope&, const char* s, size_t n, string& result); + public: static string const& ename (semantics::nameable& n) -- cgit v1.1