Jelajahi Sumber

[lua] fix do while loop

Justin Donaldson 6 tahun lalu
induk
melakukan
c396e0bd02
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/generators/genlua.ml

+ 1 - 1
src/generators/genlua.ml

@@ -917,8 +917,8 @@ and gen_expr ?(local=true) ctx e = begin
     | TWhile (cond,e,Ast.NormalWhile) ->
         gen_loop ctx "while" cond e
     | TWhile (cond,e,Ast.DoWhile) ->
-        println ctx "while true do ";
         gen_block_element ctx e;
+        newline ctx;
         gen_loop ctx "while" cond e
     | TObjectDecl [] ->
         spr ctx "_hx_e()";