aboutsummaryrefslogtreecommitdiff
path: root/build/token
diff options
context:
space:
mode:
Diffstat (limited to 'build/token')
-rw-r--r--build/token11
1 files changed, 10 insertions, 1 deletions
diff --git a/build/token b/build/token
index 7eed747..d98b2e1 100644
--- a/build/token
+++ b/build/token
@@ -37,6 +37,7 @@ namespace build
bool separated; // Whitespace-separated from the previous token.
bool quoted; // Name (or some part of it) was quoted.
+ char pair; // Only valid for pair_separator.
std::string value; // Only valid for name.
std::uint64_t line;
@@ -44,7 +45,15 @@ namespace build
public:
token (token_type t, bool s, std::uint64_t l, std::uint64_t c)
- : type (t), separated (s), line (l), column (c) {}
+ : type (t), separated (s), quoted (false), line (l), column (c) {}
+
+ token (char p, bool s, std::uint64_t l, std::uint64_t c)
+ : type (token_type::pair_separator),
+ separated (s),
+ quoted (false),
+ pair (p),
+ line (l),
+ column (c) {}
token (std::string n, bool s, bool q, std::uint64_t l, std::uint64_t c)
: type (token_type::name),