aboutsummaryrefslogtreecommitdiff
path: root/libbutl/manifest-parser.mxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbutl/manifest-parser.mxx')
-rw-r--r--libbutl/manifest-parser.mxx25
1 files changed, 7 insertions, 18 deletions
diff --git a/libbutl/manifest-parser.mxx b/libbutl/manifest-parser.mxx
index 4af7dba..7fc4ee3 100644
--- a/libbutl/manifest-parser.mxx
+++ b/libbutl/manifest-parser.mxx
@@ -25,8 +25,10 @@ import std.core;
import std.io;
#endif
import butl.char_scanner;
+import butl.manifest_types;
#else
#include <libbutl/char-scanner.mxx>
+#include <libbutl/manifest-types.mxx>
#endif
#include <libbutl/export.hxx>
@@ -47,22 +49,6 @@ LIBBUTL_MODEXPORT namespace butl
std::string description;
};
- class manifest_name_value
- {
- public:
- std::string name;
- std::string value;
-
- std::uint64_t name_line;
- std::uint64_t name_column;
-
- std::uint64_t value_line;
- std::uint64_t value_column;
-
- bool
- empty () const {return name.empty () && value.empty ();}
- };
-
class LIBBUTL_SYMEXPORT manifest_parser: protected butl::char_scanner
{
public:
@@ -102,9 +88,12 @@ LIBBUTL_MODEXPORT namespace butl
void
parse_value (manifest_name_value&);
- // Skip spaces and return the first peeked non-space character.
+ // Skip spaces and return the first peeked non-space character and the
+ // starting position of the line it belongs to. If the later is not
+ // available (skipped spaces are all in the middle of a line, we are at
+ // eos, etc.), then fallback to the first peeked character position.
//
- xchar
+ std::pair<xchar, std::uint64_t>
skip_spaces ();
private: