aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/parser.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-07-13 13:24:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-07-13 13:41:40 +0200
commit0ce923f1b9b008cf44602255f935bf3d9c4ba90d (patch)
treea087f20a78f134ad2efde7f38f5d720b9e1155a2 /libbuild2/parser.cxx
parent4b15244f65eb246d4e5d98ebfc1aa3137dc7275e (diff)
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.
Diffstat (limited to 'libbuild2/parser.cxx')
-rw-r--r--libbuild2/parser.cxx8
1 files changed, 8 insertions, 0 deletions
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;