浏览代码

[lua] Spawn _hx_empty where possible

peyty 9 年之前
父节点
当前提交
3ec8331273
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      genlua.ml

+ 3 - 0
genlua.ml

@@ -681,6 +681,9 @@ and gen_expr ?(local=true) ctx e = begin
 		newline ctx;
 		sprln ctx "end";
 		spr ctx "break end";
+	| TObjectDecl [] ->
+		spr ctx "_hx_empty()";
+		ctx.separator <- true
 	| TObjectDecl fields ->
 		spr ctx "_hx_anon(";
 		concat ctx ", " (fun (f,e) -> print ctx "\"%s\", " f; gen_value ctx e) fields;