aboutsummaryrefslogtreecommitdiff
path: root/build2/token
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-12 16:10:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-12 16:10:48 +0200
commit4e665067ff264c55086fdfb776a95b0fbb4d432c (patch)
tree2371403561c0a3d754792f68d2515cae71dff565 /build2/token
parent00ed965e4a29f66666d2bf4372d2d6919c29664e (diff)
<types>/<utility> scheme cleanup
Diffstat (limited to 'build2/token')
-rw-r--r--build2/token25
1 files changed, 11 insertions, 14 deletions
diff --git a/build2/token b/build2/token
index 5b75e1c..31e7baa 100644
--- a/build2/token
+++ b/build2/token
@@ -5,11 +5,8 @@
#ifndef BUILD2_TOKEN
#define BUILD2_TOKEN
-#include <string>
-#include <iosfwd>
-#include <cstddef> // size_t
-#include <cstdint> // uint64_t
-#include <utility> // move
+#include <build2/types>
+#include <build2/utility>
namespace build2
{
@@ -40,16 +37,16 @@ namespace build2
bool quoted; // Name (or some part of it) was quoted.
char pair; // Only valid for pair_separator.
- std::string value; // Only valid for name.
+ string value; // Only valid for name.
- std::uint64_t line;
- std::uint64_t column;
+ uint64_t line;
+ uint64_t column;
public:
- token (token_type t, bool s, std::uint64_t l, std::uint64_t c)
+ token (token_type t, bool s, uint64_t l, uint64_t c)
: type (t), separated (s), quoted (false), line (l), column (c) {}
- token (char p, bool s, std::uint64_t l, std::uint64_t c)
+ token (char p, bool s, uint64_t l, uint64_t c)
: type (token_type::pair_separator),
separated (s),
quoted (false),
@@ -57,19 +54,19 @@ namespace build2
line (l),
column (c) {}
- token (std::string n, bool s, bool q, std::uint64_t l, std::uint64_t c)
+ token (string n, bool s, bool q, uint64_t l, uint64_t c)
: type (token_type::name),
separated (s),
quoted (q),
- value (std::move (n)),
+ value (move (n)),
line (l),
column (c) {}
};
// Output the token value in a format suitable for diagnostics.
//
- std::ostream&
- operator<< (std::ostream&, const token&);
+ ostream&
+ operator<< (ostream&, const token&);
}
#endif // BUILD2_TOKEN