Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b9b244512 |
@@ -21,15 +21,8 @@ class Test extends TestCase {
|
|||||||
function test():Void {
|
function test():Void {
|
||||||
assertScript("0",0);
|
assertScript("0",0);
|
||||||
assertScript("0xFF", 255);
|
assertScript("0xFF", 255);
|
||||||
#if !(php || python)
|
assertScript("0xBFFFFFFF", 0xBFFFFFFF);
|
||||||
#if haxe3
|
assertScript("0x7FFFFFFF", 0x7FFFFFFF);
|
||||||
assertScript("0xBFFFFFFF", 0xBFFFFFFF);
|
|
||||||
assertScript("0x7FFFFFFF", 0x7FFFFFFF);
|
|
||||||
#elseif !neko
|
|
||||||
assertScript("n(0xBFFFFFFF)", 0xBFFFFFFF, { n : haxe.Int32.toNativeInt });
|
|
||||||
assertScript("n(0x7FFFFFFF)", 0x7FFFFFFF, { n : haxe.Int32.toNativeInt } );
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
assertScript("-123",-123);
|
assertScript("-123",-123);
|
||||||
assertScript("- 123",-123);
|
assertScript("- 123",-123);
|
||||||
assertScript("1.546",1.546);
|
assertScript("1.546",1.546);
|
||||||
|
|||||||
+2
-2
@@ -983,7 +983,7 @@ class Parser {
|
|||||||
// in case of '...'
|
// in case of '...'
|
||||||
if( exp == 10 && readChar() == 46 ) {
|
if( exp == 10 && readChar() == 46 ) {
|
||||||
push(TOp("..."));
|
push(TOp("..."));
|
||||||
var i = Std.int(n);
|
var i = Std.int(n) & 0xFFFFFFFF;
|
||||||
return TConst( (i == n) ? CInt(i) : CFloat(n) );
|
return TConst( (i == n) ? CInt(i) : CFloat(n) );
|
||||||
}
|
}
|
||||||
invalidChar(char);
|
invalidChar(char);
|
||||||
@@ -1006,7 +1006,7 @@ class Parser {
|
|||||||
n = (n << 4) + (char - 87);
|
n = (n << 4) + (char - 87);
|
||||||
default:
|
default:
|
||||||
this.char = char;
|
this.char = char;
|
||||||
return TConst(CInt(n));
|
return TConst(CInt(n & 0xFFFFFFFF));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user