aboutsummaryrefslogtreecommitdiff
path: root/build2/token.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-12-05 15:09:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-12-05 15:09:04 +0200
commit54870fb76b5f59cc2e6d69a8c7a8ef17853a0029 (patch)
tree770b01aa56348ec75f17fb834a2a7123ba9c3f73 /build2/token.cxx
parentef7cb7ea3e6fcb21a4fcf38602b3f43f03232ace (diff)
Add comma, ternary, logical operators support in eval context
Diffstat (limited to 'build2/token.cxx')
-rw-r--r--build2/token.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/build2/token.cxx b/build2/token.cxx
index df0d8ce..caa775b 100644
--- a/build2/token.cxx
+++ b/build2/token.cxx
@@ -23,22 +23,33 @@ namespace build2
case token_type::word: os << '\'' << t.value << '\''; break;
case token_type::colon: os << q << ':' << q; break;
+ case token_type::dollar: os << q << '$' << q; break;
+ case token_type::question: os << q << '?' << q; break;
+ case token_type::comma: os << q << ',' << q; break;
+
+ case token_type::lparen: os << q << '(' << q; break;
+ case token_type::rparen: os << q << ')' << q; break;
+
case token_type::lcbrace: os << q << '{' << q; break;
case token_type::rcbrace: os << q << '}' << q; break;
+
case token_type::lsbrace: os << q << '[' << q; break;
case token_type::rsbrace: os << q << ']' << q; break;
+
case token_type::assign: os << q << '=' << q; break;
case token_type::prepend: os << q << "=+" << q; break;
case token_type::append: os << q << "+=" << q; break;
+
case token_type::equal: os << q << "==" << q; break;
case token_type::not_equal: os << q << "!=" << q; break;
case token_type::less: os << q << '<' << q; break;
case token_type::greater: os << q << '>' << q; break;
case token_type::less_equal: os << q << "<=" << q; break;
case token_type::greater_equal: os << q << ">=" << q; break;
- case token_type::dollar: os << q << '$' << q; break;
- case token_type::lparen: os << q << '(' << q; break;
- case token_type::rparen: os << q << ')' << q; break;
+
+ case token_type::log_or: os << q << "||" << q; break;
+ case token_type::log_and: os << q << "&&" << q; break;
+ case token_type::log_not: os << q << '!' << q; break;
default: assert (false); // Unhandled extended token.
}