diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-12-15 17:23:37 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-12-15 17:27:56 +0300 |
commit | 3bf1846063ad30ecc0fc90d34490bf70776faef0 (patch) | |
tree | 8a2a248be187671f8d9fd75d3367bfb9de782e45 /libbutl/manifest-types.mxx | |
parent | 5bff24a8862f61e40f827591be5c81228efab4c6 (diff) |
Add manifest_rewriter class
Diffstat (limited to 'libbutl/manifest-types.mxx')
-rw-r--r-- | libbutl/manifest-types.mxx | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/libbutl/manifest-types.mxx b/libbutl/manifest-types.mxx new file mode 100644 index 0000000..f9050ab --- /dev/null +++ b/libbutl/manifest-types.mxx @@ -0,0 +1,49 @@ +// file : libbutl/manifest-types.mxx -*- C++ -*- +// copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef __cpp_modules +#pragma once +#endif + +// C includes. + +#ifndef __cpp_lib_modules +#include <string> +#include <cstdint> // uint64_t +#endif + +// Other includes. + +#ifdef __cpp_modules +export module butl.manifest_types; +#ifdef __cpp_lib_modules +import std.core; +#endif +#else +#endif + +#include <libbutl/export.hxx> + +LIBBUTL_MODEXPORT namespace butl +{ + 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; + + std::uint64_t start_pos; // Position of name/value-starting character. + std::uint64_t colon_pos; // Position of name/value-separating ':'. + std::uint64_t end_pos; // Position of name/value-terminating '\n' or EOF. + + bool + empty () const {return name.empty () && value.empty ();} + }; +} |