cgen: fix indent in `for_in_string` (#5631)

pull/5644/head
yuyi 2020-07-04 00:10:45 +08:00 committed by GitHub
parent 61213263cd
commit 67e85fa9dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -894,7 +894,7 @@ fn (mut g Gen) for_in(it ast.ForInStmt) {
g.write('for (int $i = 0; $i < ')
g.expr(it.cond)
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.writeln('.args[$i];')
g.stmts(it.stmts)
@ -905,7 +905,7 @@ fn (mut g Gen) for_in(it ast.ForInStmt) {
g.expr(it.cond)
g.writeln('.len; ++$i) {')
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.writeln('.str[$i];')
}