소스 검색

allow no-platform

Nicolas Cannasse 18 년 전
부모
커밋
e1a7a221a8
2개의 변경된 파일18개의 추가작업 그리고 9개의 파일을 삭제
  1. 4 2
      std/Math.hx
  2. 14 7
      std/Std.hx

+ 4 - 2
std/Math.hx

@@ -76,7 +76,8 @@ extern class Math
 			_global["isFinite"](i);
 			#else js
 			__js__("isFinite")(i);
-			#else error
+			#else true
+			false;
 			#end
 		};
 		Math.isNaN = function(i) {
@@ -87,7 +88,8 @@ extern class Math
 			_global["isNaN"](i);
 			#else js
 			__js__("isNaN")(i);
-			#else error
+			#else true
+			false;
 			#end
 		};
 	#end

+ 14 - 7
std/Std.hx

@@ -39,7 +39,8 @@ class Std {
 		neko.Boot.__instanceof(v,t);
 		#else js
 		js.Boot.__instanceof(v,t);
-		#else error
+		#else true
+		false;
 		#end
 	}
 
@@ -54,7 +55,8 @@ class Std {
 		new String(__dollar__string(s));
 		#else js
 		js.Boot.__string_rec(s,"");
-		#else error
+		#else true
+		"";
 		#end
 	}
 
@@ -106,7 +108,8 @@ class Std {
 		if( Math.isNaN(v) )
 			return null;
 		return v;
-		#else error
+		#else true
+		return 0;
 		#end
 		}
 	}
@@ -124,7 +127,8 @@ class Std {
 		__dollar__float(x.__s);
 		#else js
 		__js__("parseFloat")(x);
-		#else error
+		#else true
+		0;
 		#end
 	}
 
@@ -157,7 +161,8 @@ class Std {
 			return null;
 		else
 			return x.charCodeAt(0);
-		#else error
+		#else true
+		return null;
 		#end
 	}
 
@@ -174,7 +179,8 @@ class Std {
 		Math._rand_int(Math.__rnd,x);
 		#else js
 		Math.floor(Math.random()*x);
-		#else error
+		#else true
+		0;
 		#end
 	}
 
@@ -193,7 +199,8 @@ class Std {
 		__dollar__objget(neko.Boot.__res,__dollar__hash(name.__s));
 		#else js
 		js.Boot.__res[name];
-		#else error
+		#else true
+		null;
 		#end
 	}