aboutsummaryrefslogtreecommitdiff
path: root/libbutl/manifest-parser.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-08-01 16:42:22 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-08-02 01:01:41 +0300
commit6254448640530240dc9199bed60cd5568cbaf601 (patch)
tree4f859f61f1980bde1027fd3e22573157e9b5bd4b /libbutl/manifest-parser.hxx
parent12d0fb176edd8220f80f706d3fdc33431e178695 (diff)
Add manifest_parser::split_comment() and manifest_serializer::merge_comment()
Diffstat (limited to 'libbutl/manifest-parser.hxx')
-rw-r--r--libbutl/manifest-parser.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbutl/manifest-parser.hxx b/libbutl/manifest-parser.hxx
index fd0cc4e..f84badd 100644
--- a/libbutl/manifest-parser.hxx
+++ b/libbutl/manifest-parser.hxx
@@ -8,6 +8,7 @@
#include <string>
#include <iosfwd>
#include <cstdint> // uint64_t
+#include <utility> // pair
#include <stdexcept> // runtime_error
#include <libbutl/export.hxx>
@@ -71,6 +72,13 @@ namespace butl
manifest_name_value
next ();
+ // Split the manifest value, optionally followed by ';' character and a
+ // comment into the value/comment pair. Note that ';' characters in the
+ // value must be escaped by the backslash.
+ //
+ static std::pair<std::string, std::string>
+ split_comment (const std::string&);
+
private:
void
parse_name (manifest_name_value&);