Explorar el Código

TWhile prints statements/blocks, not expressions

Somehow Haxe tells to generator that here is an `a[b]` expression, not
a block. This is okay, coz other Haxe targets don’t trait this as error.
Fixes Issue2236 line 46
TODO:
Same for other loops
PeyTy hace 10 años
padre
commit
9b70d967fc
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      genlua.ml

+ 1 - 1
genlua.ml

@@ -601,7 +601,7 @@ and gen_expr ctx e =
 		spr ctx "while ";
 		gen_cond ctx cond;
 		spr ctx " do ";
-		gen_expr ctx e;
+		gen_block_element ctx e;
 		handle_break();
 		newline ctx;
 		(* TODO: generate this label conditionally *)