aboutsummaryrefslogtreecommitdiff
path: root/build/parser.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-10 11:12:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-10 11:12:12 +0200
commit4eacc5d063b2810c87510b7afad5d0be203540a3 (patch)
tree1b575334db825ad63a13fd0a758bc1a48e4df560 /build/parser.cxx
parentc5c880e5627d88ab2f7dd7596d59cf34ebba1ebb (diff)
Fix bug in names() chunking mode
Diffstat (limited to 'build/parser.cxx')
-rw-r--r--build/parser.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/build/parser.cxx b/build/parser.cxx
index 092ae3d..b804494 100644
--- a/build/parser.cxx
+++ b/build/parser.cxx
@@ -871,12 +871,12 @@ namespace build
// current or next token is a pair separator, since we want the
// "x = y" pair to be parsed as a single chunk.
//
- if (chunk &&
- peeked ().separated &&
- (tt != type::pair_separator && t.type != type::pair_separator))
- break;
+ bool p (t.type == type::pair_separator); // Current token.
next (t, tt);
+
+ if (chunk && t.separated && (tt != type::pair_separator && !p))
+ break;
}
// Name.