aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2017-07-03 19:15:16 +0200
committerMichael Matz <matz@suse.de>2017-07-03 19:15:16 +0200
commit580ad5f24c9542bfaa7e24ae8a32af3e0e5a6cf9 (patch)
tree1703813fd5150c4676d15100f251fc7d008d04ac
parent27ca3038748d9bff81ae72cd19dadb4467e5d1de (diff)
downloadtinycc-580ad5f24c9542bfaa7e24ae8a32af3e0e5a6cf9.tar.gz
tinycc-580ad5f24c9542bfaa7e24ae8a32af3e0e5a6cf9.tar.bz2
Extend skip_or_save_block
Make it stop also before outer level closing parens. This way we can now also skip/save the expression inside "foobar(42 + 41)".
-rw-r--r--tccgen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tccgen.c b/tccgen.c
index f875e51..2885f3e 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -5878,7 +5878,7 @@ static void skip_or_save_block(TokenString **str)
if (str)
*str = tok_str_alloc();
- while ((level > 0 || (tok != '}' && tok != ',' && tok != ';'))) {
+ while ((level > 0 || (tok != '}' && tok != ',' && tok != ';' && tok != ')'))) {
int t;
if (tok == TOK_EOF) {
if (str || level > 0)