ci: fix code-formatting job

pull/8704/head
Delyan Angelov 2021-02-12 15:44:12 +02:00
parent 5d36a59dd8
commit 1675b6f3e0
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 2 additions and 1 deletions

View File

@ -1013,9 +1013,10 @@ fn (mut p Parser) parse_multi_expr(is_top_level bool) ast.Stmt {
p.error('expecting `:=` (e.g. `mut x :=`)') p.error('expecting `:=` (e.g. `mut x :=`)')
return ast.Stmt{} return ast.Stmt{}
} }
// TODO remove translated
if p.tok.kind in [.assign, .decl_assign] || p.tok.kind.is_assign() { if p.tok.kind in [.assign, .decl_assign] || p.tok.kind.is_assign() {
return p.partial_assign_stmt(left, left_comments) return p.partial_assign_stmt(left, left_comments)
} else if !p.pref.translated // TODO remove translated } else if !p.pref.translated
&& tok.kind !in [.key_if, .key_match, .key_lock, .key_rlock, .key_select] && tok.kind !in [.key_if, .key_match, .key_lock, .key_rlock, .key_select]
&& left0 !is ast.CallExpr && (is_top_level || p.tok.kind != .rcbr) && left0 !is ast.CallExpr && (is_top_level || p.tok.kind != .rcbr)
&& left0 !is ast.PostfixExpr && !(left0 is ast.InfixExpr && left0 !is ast.PostfixExpr && !(left0 is ast.InfixExpr