This commit is contained in:
Dante
2026-05-21 23:40:20 -07:00
parent 3e2915dff7
commit 877a69d844
5737 changed files with 29796 additions and 1589684 deletions

View File

@ -100,4 +100,10 @@ class Lib {
str = str.split("\\").join("\\\\");
flash.external.ExternalInterface.call("console." + type, str);
}
public static var parseInt(get, never):(string:String, ?radix:Int) -> Float;
extern static inline function get_parseInt():(string:String, ?radix:Int) -> Float {
return untyped __global__["parseInt"];
}
}

View File

@ -49,13 +49,12 @@ import flash.Boot;
return untyped __int__(x);
}
public static function parseInt(x:String):Null<Int>
untyped {
var v = __global__["parseInt"](x);
if (__global__["isNaN"](v))
return null;
return v;
}
public static function parseInt(x:String):Null<Int> {
final v = flash.Lib.parseInt(x);
if (Math.isNaN(v))
return null;
return cast v;
}
public static function parseFloat(x:String):Float {
return untyped __global__["parseFloat"](x);

View File

@ -69,7 +69,7 @@ package haxe.ds;
public function toString():String {
var s = new StringBuf();
s.add("{");
s.add("[");
var it = keys();
for (i in it) {
s.add(i);
@ -78,7 +78,7 @@ package haxe.ds;
if (it.hasNext())
s.add(", ");
}
s.add("}");
s.add("]");
return s.toString();
}

View File

@ -66,14 +66,14 @@ class ObjectMap<K:{}, V> extends flash.utils.Dictionary implements haxe.Constrai
}
public function toString():String {
var s = "";
var s = "[";
var it = keys();
for (i in it) {
s += (s == "" ? "" : ",") + Std.string(i);
s += " => ";
s += Std.string(get(i));
}
return s + "}";
return s + "]";
}
public function clear():Void {

View File

@ -107,7 +107,7 @@ package haxe.ds;
public function toString():String {
var s = new StringBuf();
s.add("{");
s.add("[");
var it = keys();
for (i in it) {
s.add(i);
@ -116,7 +116,7 @@ package haxe.ds;
if (it.hasNext())
s.add(", ");
}
s.add("}");
s.add("]");
return s.toString();
}

View File

@ -74,7 +74,7 @@ class UnsafeStringMap<T> implements haxe.Constraints.IMap<String, T> {
public function toString():String {
var s = new StringBuf();
s.add("{");
s.add("[");
var it = keys();
for (i in it) {
s.add(i);
@ -83,7 +83,7 @@ class UnsafeStringMap<T> implements haxe.Constraints.IMap<String, T> {
if (it.hasNext())
s.add(", ");
}
s.add("}");
s.add("]");
return s.toString();
}

View File

@ -66,14 +66,14 @@ class WeakMap<K:{}, V> extends flash.utils.Dictionary implements haxe.Constraint
}
public function toString():String {
var s = "";
var s = "[";
var it = keys();
for (i in it) {
s += (s == "" ? "" : ",") + Std.string(i);
s += " => ";
s += Std.string(get(i));
}
return s + "}";
return s + "]";
}
public function clear():Void {

View File

@ -8,7 +8,7 @@ package flash.globalization;
function format(dateTime : Date) : String;
function formatUTC(dateTime : Date) : String;
function getDateStyle() : DateTimeStyle;
function getDateTimePattern() : DateTimeStyle;
function getDateTimePattern() : String;
function getFirstWeekday() : Int;
function getMonthNames(?nameStyle : DateTimeNameStyle, ?context : DateTimeNameContext) : flash.Vector<String>;
function getTimeStyle() : DateTimeStyle;