Jelajahi Sumber

[lua] remove extra semicolon from inline PairTools code

Aleksandr Kuzmenko 5 tahun lalu
induk
melakukan
c6d033294d
2 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 1 0
      extra/CHANGES.txt
  2. 2 2
      std/lua/PairTools.hx

+ 1 - 0
extra/CHANGES.txt

@@ -16,6 +16,7 @@
 	cpp : fixed broken externs in `cpp` package (#9452)
 	js/cpp : fixed catch var naming collision (#9413)
 	interp : fixed throwing `haxe.macro.Error` outside of a macro context (#9390)
+	lua : fixed lua.PairTools.ipairsMap method
 
 2020-05-13: 4.1.0
 

+ 2 - 2
std/lua/PairTools.hx

@@ -36,13 +36,13 @@ class PairTools {
 
 	public static function ipairsMap<A, B>(table:Table<Dynamic, A>, func:Int->A->B):Table<Int, B> {
 		var ret:Table<Int, B> = Table.create();
-		untyped __lua__("for i,v in _G.ipairs(table) do ret[i] = func(i,v) end;");
+		untyped __lua__("for i,v in _G.ipairs(table) do ret[i] = func(i,v) end");
 		return ret;
 	}
 
 	public static function pairsMap<A, B, C>(table:Table<A, B>, func:A->B->C->C):Table<A, C> {
 		var ret:Table<A, C> = Table.create();
-		untyped __lua__("for k,v in _G.pairs(table) do ret[k] = func(k,v) end;");
+		untyped __lua__("for k,v in _G.pairs(table) do ret[k] = func(k,v) end");
 		return ret;
 	}