aboutsummaryrefslogtreecommitdiff
path: root/build2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-06 14:21:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-06 14:21:30 +0200
commitec2247ead804e7cde1fe6a0f0b8112440e80a61c (patch)
tree1c8fb52317c5f013ec7797d355c388433f3f8b0a /build2
parent4da38e50a096e9aa19a75149bcc9dbb6e1de901e (diff)
Only recognize function call if lparen is unseparated
Diffstat (limited to 'build2')
-rw-r--r--build2/parser.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/build2/parser.cxx b/build2/parser.cxx
index a5ed0d5..412b557 100644
--- a/build2/parser.cxx
+++ b/build2/parser.cxx
@@ -2793,7 +2793,10 @@ namespace build2
//
tt = peek ();
- if (tt == type::lparen)
+ // Note that we require function call opening paren to be
+ // unseparated; consider: $x ($x == 'foo' ? 'FOO' : 'BAR').
+ //
+ if (tt == type::lparen && !peeked ().separated)
{
// Function call.
//