1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vfmt: no longer replace go with spawn

This commit is contained in:
Alexander Medvednikov 2023-05-28 16:03:39 +02:00
parent 786865d349
commit f8422738bb
2 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ fn (mut p Parser) check_expr(precedence int) !ast.Expr {
}
}
.key_go, .key_spawn {
if p.pref.use_coroutines && p.tok.kind == .key_go {
if (p.pref.use_coroutines || p.pref.is_fmt) && p.tok.kind == .key_go {
mut go_expr := p.go_expr()
go_expr.is_expr = true
node = go_expr

View File

@ -1078,7 +1078,7 @@ fn (mut p Parser) stmt(is_top_level bool) ast.Stmt {
}
}
.key_go, .key_spawn {
if p.pref.use_coroutines && p.tok.kind == .key_go {
if (p.pref.use_coroutines || p.pref.is_fmt) && p.tok.kind == .key_go {
go_expr := p.go_expr()
return ast.ExprStmt{
expr: go_expr