From ec2247ead804e7cde1fe6a0f0b8112440e80a61c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 Mar 2017 14:21:30 +0200 Subject: Only recognize function call if lparen is unseparated --- build2/parser.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build2') 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. // -- cgit v1.1