diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-06-11 16:14:55 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-06-11 16:14:55 +0200 |
commit | ed158b59063cd238a12bb022b465ebf491b43ef6 (patch) | |
tree | 405b7bdf2c1e09ba5272fd16d9a7abdb53d0e50f /bpkg/manifest-parser | |
parent | 72648921ec28903615698a61aeff4799e1ca9a7d (diff) |
Minor fixes to manifest parser
Diffstat (limited to 'bpkg/manifest-parser')
-rw-r--r-- | bpkg/manifest-parser | 8 |
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: |