From 0ce923f1b9b008cf44602255f935bf3d9c4ba90d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Jul 2020 13:24:07 +0200 Subject: Reserve backtick (`) and bit-or (|) in eval context for future use Specifically, they are reserved for future support of arithmetic evaluation contexts and evaluation pipelines, respectively. --- libbuild2/parser.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libbuild2/parser.cxx') diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx index 2255947..711c5f0 100644 --- a/libbuild2/parser.cxx +++ b/libbuild2/parser.cxx @@ -4038,6 +4038,12 @@ namespace build2 values r (parse_eval_comma (t, tt, pmode, true)); + if (tt == type::backtick) // @@ TMP + fail (t) << "arithmetic evaluation context not yet supported"; + + if (tt == type::bit_or) // @@ TMP + fail (t) << "evaluation pipeline not yet supported"; + if (tt != type::rparen) fail (t) << "unexpected " << t; // E.g., stray ':'. @@ -5862,6 +5868,8 @@ namespace build2 case type::dollar: r = '$'; break; case type::question: r = '?'; break; case type::comma: r = ','; break; + case type::backtick: r = '`'; break; + case type::bit_or: r = '|'; break; case type::log_not: r = '!'; break; case type::lparen: r = '('; break; case type::rparen: r = ')'; break; -- cgit v1.1