summaryrefslogtreecommitdiff
path: root/cli/context.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-09 13:33:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-09 13:33:09 +0200
commita89ee85a4b94a57e996a233c9d21679d1e1217a9 (patch)
tree24b85140035a61c61849b4b4f359e9fdd83fd826 /cli/context.hxx
parentcf658f4475bb22dbfaa365d53b4a3fd7e6140ec4 (diff)
Add support for variable expansion (\$var$) in doc strings
Diffstat (limited to 'cli/context.hxx')
-rw-r--r--cli/context.hxx9
1 files changed, 8 insertions, 1 deletions
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)