parser: add additional paren for multi case branch

pull/1866/head
Danil-Lapirow 2019-09-04 19:47:37 +03:00 committed by Alexander Medvednikov
parent dd670fb4a3
commit 5c43bfbf13
1 changed files with 3 additions and 0 deletions

View File

@ -3474,6 +3474,9 @@ fn (p mut Parser) match_statement(is_expr bool) string {
p.expected_type = ''
if p.tok != .comma {
if got_comma {
p.gen(') ')
}
break
}
p.check(.comma)