2
0
Эх сурвалжийг харах

[lua] drop some refactored methods from lua.Boot

Justin Donaldson 5 жил өмнө
parent
commit
444ad1aa0b
1 өөрчлөгдсөн 1 нэмэгдсэн , 28 устгасан
  1. 1 28
      std/lua/Boot.hx

+ 1 - 28
std/lua/Boot.hx

@@ -39,8 +39,7 @@ class Boot {
 
 	public static var platformBigEndian = NativeStringTools.byte(NativeStringTools.dump(function() {}), 7) > 0;
 
-	static var hiddenFields:Table<String,
-		Bool> = untyped __lua__("{__id__=true, hx__closures=true, super=true, prototype=true, __fields__=true, __ifields__=true, __class__=true, __properties__=true}");
+	static var hiddenFields:Table<String, Bool> = untyped __lua__("{__id__=true, hx__closures=true, super=true, prototype=true, __fields__=true, __ifields__=true, __class__=true, __properties__=true}");
 
 	static function __unhtml(s:String)
 		return s.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
@@ -271,32 +270,6 @@ class Boot {
 		}
 	}
 
-	public static function fieldIterator(o:Table<String, Dynamic>):Iterator<String> {
-		if (Lua.type(o) != "table") {
-			return {
-				next: function() return null,
-				hasNext: function() return false
-			}
-		}
-		var tbl:Table<String, String> = cast(untyped o.__fields__ != null) ? o.__fields__ : o;
-		var cur = Lua.pairs(tbl).next;
-		var next_valid = function(tbl, val) {
-			while (hiddenFields[untyped val] != null) {
-				val = cur(tbl, val).index;
-			}
-			return val;
-		}
-		var cur_val = next_valid(tbl, cur(tbl, null).index);
-		return {
-			next: function() {
-				var ret = cur_val;
-				cur_val = next_valid(tbl, cur(tbl, cur_val).index);
-				return ret;
-			},
-			hasNext: function() return cur_val != null
-		}
-	}
-
 	static var os_patterns = [
 		'Windows' => ['windows', '^mingw', '^cygwin'],
 		'Linux' => ['linux'],