Explorar o código

Lua: use instance methods for inline iterator usage

Justin Donaldson %!s(int64=9) %!d(string=hai) anos
pai
achega
429112593d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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;