From b0092235fc9b78931e459d1af2bf25d67dbdec6c Mon Sep 17 00:00:00 2001 From: Danil-Lapirow Date: Wed, 18 Sep 2019 16:13:22 +0300 Subject: [PATCH] parser: fix a more complicated "in" usage --- compiler/parser.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/parser.v b/compiler/parser.v index 6f6b842c6d..0c4d41a1ac 100644 --- a/compiler/parser.v +++ b/compiler/parser.v @@ -2081,7 +2081,7 @@ fn (p mut Parser) expression() string { p.fgen(' ') p.check(.key_in) p.fgen(' ') - p.gen(', ') + p.gen('), ') arr_typ := p.expression() is_map := arr_typ.starts_with('map_') if !arr_typ.starts_with('array_') && !is_map { @@ -2093,10 +2093,10 @@ fn (p mut Parser) expression() string { } // `typ` is element's type if is_map { - p.cgen.set_placeholder(ph, '_IN_MAP( ') + p.cgen.set_placeholder(ph, '_IN_MAP( (') } else { - p.cgen.set_placeholder(ph, '_IN($typ, ') + p.cgen.set_placeholder(ph, '_IN($typ, (') } p.gen(')') return 'bool'