diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-16 13:20:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-16 13:20:06 +0200 |
commit | 77a0988759f295893b0b0e171249661a2059b1e7 (patch) | |
tree | 4c131abbc42179546fb76b2f588b4e389719e23f /build/token | |
parent | 9553742cf67863e81e4ff053506ca9f87ced57e4 (diff) |
Implement support for multiple scope/targets in variable assignment
Can now even do this:
foo/ file{*-bar} file{baz}: x = y
Diffstat (limited to 'build/token')
-rw-r--r-- | build/token | 11 |
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), |