Explorar el Código

added "," for objects display.

Nicolas Cannasse hace 19 años
padre
commit
6f7a89887b
Se han modificado 1 ficheros con 5 adiciones y 3 borrados
  1. 5 3
      std/js/Boot.hx

+ 5 - 3
std/js/Boot.hx

@@ -89,15 +89,17 @@ class Boot {
 				var str = "{\n";
 				s += "\t";
 				__js__("for( var k in o ) { ");
+					if( str.length != 2 )
+						str += ", \n";
 					if( k == "__class__" && o[k].__interfaces__ != null )
 						__js__("continue");
 					if( k == "__construct__" && __js__("typeof(o[k])") == "function" )
-						str += s + k + " : <function>\n";
+						str += s + k + " : <function>";
 					else
-						str += s + k + " : "+__string_rec(o[k],s)+"\n";
+						str += s + k + " : "+__string_rec(o[k],s);
 				__js__("}");
 				s = s.substring(1);
-				str += s + "}";
+				str += "\n" + s + "}";
 				return str;
 			case "function":
 				return "<function>";