aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest-parser
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-11 16:14:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-11 16:14:55 +0200
commited158b59063cd238a12bb022b465ebf491b43ef6 (patch)
tree405b7bdf2c1e09ba5272fd16d9a7abdb53d0e50f /bpkg/manifest-parser
parent72648921ec28903615698a61aeff4799e1ca9a7d (diff)
Minor fixes to manifest parser
Diffstat (limited to 'bpkg/manifest-parser')
-rw-r--r--bpkg/manifest-parser8
1 files changed, 6 insertions, 2 deletions
diff --git a/bpkg/manifest-parser b/bpkg/manifest-parser
index 2b1e4a5..070cb77 100644
--- a/bpkg/manifest-parser
+++ b/bpkg/manifest-parser
@@ -35,8 +35,9 @@ namespace bpkg
const std::string&
name () const {return name_;}
- struct name_value_type
+ class name_value_type
{
+ public:
std::string name;
std::string value;
@@ -45,6 +46,9 @@ namespace bpkg
std::uint64_t value_line;
std::uint64_t value_column;
+
+ bool
+ empty () const {return name.empty () && value.empty ();}
};
// The first returned pair is special "start-of-manifest" with
@@ -121,7 +125,7 @@ namespace bpkg
}
private:
- enum {start, body, eos} s_ = start;
+ enum {start, body, end} s_ = start;
std::string version_; // Current format version.
private: