mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix indent in for_in_string (#5631)
This commit is contained in:
@@ -894,7 +894,7 @@ fn (mut g Gen) for_in(it ast.ForInStmt) {
|
|||||||
g.write('for (int $i = 0; $i < ')
|
g.write('for (int $i = 0; $i < ')
|
||||||
g.expr(it.cond)
|
g.expr(it.cond)
|
||||||
g.writeln('.len; ++$i) {')
|
g.writeln('.len; ++$i) {')
|
||||||
g.write('$styp ${c_name(it.val_var)} = ')
|
g.write('\t$styp ${c_name(it.val_var)} = ')
|
||||||
g.expr(it.cond)
|
g.expr(it.cond)
|
||||||
g.writeln('.args[$i];')
|
g.writeln('.args[$i];')
|
||||||
g.stmts(it.stmts)
|
g.stmts(it.stmts)
|
||||||
@@ -905,7 +905,7 @@ fn (mut g Gen) for_in(it ast.ForInStmt) {
|
|||||||
g.expr(it.cond)
|
g.expr(it.cond)
|
||||||
g.writeln('.len; ++$i) {')
|
g.writeln('.len; ++$i) {')
|
||||||
if it.val_var != '_' {
|
if it.val_var != '_' {
|
||||||
g.write('byte ${c_name(it.val_var)} = ')
|
g.write('\tbyte ${c_name(it.val_var)} = ')
|
||||||
g.expr(it.cond)
|
g.expr(it.cond)
|
||||||
g.writeln('.str[$i];')
|
g.writeln('.str[$i];')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user