Explorar o código

Lua : prevent creation of extra semicolons in a few places

Justin Donaldson %!s(int64=10) %!d(string=hai) anos
pai
achega
601f7adf5b
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      genlua.ml

+ 3 - 0
genlua.ml

@@ -790,6 +790,9 @@ and gen_block_element ?(after=false) ctx e =
 		gen_block_element ~after ctx (mk (TParenthesis e) e.etype e.epos)
 	| TObjectDecl fl ->
 		List.iter (fun (_,e) -> gen_block_element ~after ctx e) fl
+	| TVar (v,eo) ->
+		if not after then newline ctx;
+		gen_expr ctx e; (* these already generate semicolons*)
 	| _ ->
 		if not after then newline ctx;
 		spr ctx (debug_expression e);