浏览代码

Lua: use instance methods for inline iterator usage

Justin Donaldson 9 年之前
父节点
当前提交
429112593d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      genlua.ml

+ 2 - 2
genlua.ml

@@ -709,10 +709,10 @@ and gen_expr ?(local=true) ctx e = begin
 				newline ctx;
 				name
 		) in
-		print ctx "while( %s.hasNext() ) do" it;
+		print ctx "while( %s:hasNext() ) do" it;
 		let bend = open_block ctx in
 		newline ctx;
-		print ctx "local %s = %s.next();" (ident v.v_name) it;
+		print ctx "local %s = %s:next();" (ident v.v_name) it;
 		gen_block_element ctx e;
 		bend();
 		newline ctx;