Browse Source

standard library only.

Nicolas Cannasse 20 years ago
parent
commit
0b443c4947
1 changed files with 18 additions and 14 deletions
  1. 18 14
      std/Std.hx

+ 18 - 14
std/Std.hx

@@ -1,19 +1,23 @@
-// standard haXe types
+#flash
+import Boot;
+#end
 
-enum Void { }
-
-extern class Float { }
-
-extern class Int extends Float { }
-
-enum Bool {
-	true;
-	false;
-}
+class Std {
 
-enum Dynamic<T> {
-}
+	public static function instanceof( obj : Dynamic, vclass : Dynamic ) : Bool {
+		return untyped
+		#flash
+		Boot.__instanceof(obj,vclass);
+		#else error
+		#end
+	}
 
-class Std {
+	public static function string( s : Dynamic ) : String {
+		return untyped
+		#flash
+		String(s);
+		#else error
+		#end
+	}
 
 }