Map i64 and f64 to int and float in definitions file.
This commit is contained in:
parent
8e21c4727b
commit
d42c6b69a3
@ -1,16 +1,16 @@
|
||||
module static;
|
||||
|
||||
op ==(i64, i64) -> bool;
|
||||
op !=(i64, i64) -> bool;
|
||||
op >(i64, i64) -> bool;
|
||||
op >=(i64, i64) -> bool;
|
||||
op <(i64, i64) -> bool;
|
||||
op <=(i64, i64) -> bool;
|
||||
op &(i64, i64) -> i64;
|
||||
op |(i64, i64) -> i64;
|
||||
op ^(i64, i64) -> i64;
|
||||
op ..(i64, i64) -> Range<i64>;
|
||||
op ..=(i64, i64) -> RangeInclusive<i64>;
|
||||
op ==(int, int) -> bool;
|
||||
op !=(int, int) -> bool;
|
||||
op >(int, int) -> bool;
|
||||
op >=(int, int) -> bool;
|
||||
op <(int, int) -> bool;
|
||||
op <=(int, int) -> bool;
|
||||
op &(int, int) -> int;
|
||||
op |(int, int) -> int;
|
||||
op ^(int, int) -> int;
|
||||
op ..(int, int) -> Range<int>;
|
||||
op ..=(int, int) -> RangeInclusive<int>;
|
||||
|
||||
op ==(bool, bool) -> bool;
|
||||
op !=(bool, bool) -> bool;
|
||||
@ -29,53 +29,53 @@ op >=((), ()) -> bool;
|
||||
op <((), ()) -> bool;
|
||||
op <=((), ()) -> bool;
|
||||
|
||||
op +(i64, i64) -> i64;
|
||||
op -(i64, i64) -> i64;
|
||||
op *(i64, i64) -> i64;
|
||||
op /(i64, i64) -> i64;
|
||||
op %(i64, i64) -> i64;
|
||||
op **(i64, i64) -> i64;
|
||||
op >>(i64, i64) -> i64;
|
||||
op <<(i64, i64) -> i64;
|
||||
op +(int, int) -> int;
|
||||
op -(int, int) -> int;
|
||||
op *(int, int) -> int;
|
||||
op /(int, int) -> int;
|
||||
op %(int, int) -> int;
|
||||
op **(int, int) -> int;
|
||||
op >>(int, int) -> int;
|
||||
op <<(int, int) -> int;
|
||||
|
||||
op +(f64, f64) -> f64;
|
||||
op -(f64, f64) -> f64;
|
||||
op *(f64, f64) -> f64;
|
||||
op /(f64, f64) -> f64;
|
||||
op %(f64, f64) -> f64;
|
||||
op **(f64, f64) -> f64;
|
||||
op ==(f64, f64) -> bool;
|
||||
op !=(f64, f64) -> bool;
|
||||
op >(f64, f64) -> bool;
|
||||
op >=(f64, f64) -> bool;
|
||||
op <(f64, f64) -> bool;
|
||||
op <=(f64, f64) -> bool;
|
||||
op +(float, float) -> float;
|
||||
op -(float, float) -> float;
|
||||
op *(float, float) -> float;
|
||||
op /(float, float) -> float;
|
||||
op %(float, float) -> float;
|
||||
op **(float, float) -> float;
|
||||
op ==(float, float) -> bool;
|
||||
op !=(float, float) -> bool;
|
||||
op >(float, float) -> bool;
|
||||
op >=(float, float) -> bool;
|
||||
op <(float, float) -> bool;
|
||||
op <=(float, float) -> bool;
|
||||
|
||||
op +(f64, i64) -> f64;
|
||||
op -(f64, i64) -> f64;
|
||||
op *(f64, i64) -> f64;
|
||||
op /(f64, i64) -> f64;
|
||||
op %(f64, i64) -> f64;
|
||||
op **(f64, i64) -> f64;
|
||||
op ==(f64, i64) -> bool;
|
||||
op !=(f64, i64) -> bool;
|
||||
op >(f64, i64) -> bool;
|
||||
op >=(f64, i64) -> bool;
|
||||
op <(f64, i64) -> bool;
|
||||
op <=(f64, i64) -> bool;
|
||||
op +(float, int) -> float;
|
||||
op -(float, int) -> float;
|
||||
op *(float, int) -> float;
|
||||
op /(float, int) -> float;
|
||||
op %(float, int) -> float;
|
||||
op **(float, int) -> float;
|
||||
op ==(float, int) -> bool;
|
||||
op !=(float, int) -> bool;
|
||||
op >(float, int) -> bool;
|
||||
op >=(float, int) -> bool;
|
||||
op <(float, int) -> bool;
|
||||
op <=(float, int) -> bool;
|
||||
|
||||
op +(i64, f64) -> f64;
|
||||
op -(i64, f64) -> f64;
|
||||
op *(i64, f64) -> f64;
|
||||
op /(i64, f64) -> f64;
|
||||
op %(i64, f64) -> f64;
|
||||
op **(i64, f64) -> f64;
|
||||
op ==(i64, f64) -> bool;
|
||||
op !=(i64, f64) -> bool;
|
||||
op >(i64, f64) -> bool;
|
||||
op >=(i64, f64) -> bool;
|
||||
op <(i64, f64) -> bool;
|
||||
op <=(i64, f64) -> bool;
|
||||
op +(int, float) -> float;
|
||||
op -(int, float) -> float;
|
||||
op *(int, float) -> float;
|
||||
op /(int, float) -> float;
|
||||
op %(int, float) -> float;
|
||||
op **(int, float) -> float;
|
||||
op ==(int, float) -> bool;
|
||||
op !=(int, float) -> bool;
|
||||
op >(int, float) -> bool;
|
||||
op >=(int, float) -> bool;
|
||||
op <(int, float) -> bool;
|
||||
op <=(int, float) -> bool;
|
||||
|
||||
op +(Decimal, Decimal) -> Decimal;
|
||||
op -(Decimal, Decimal) -> Decimal;
|
||||
@ -90,31 +90,31 @@ op >=(Decimal, Decimal) -> bool;
|
||||
op <(Decimal, Decimal) -> bool;
|
||||
op <=(Decimal, Decimal) -> bool;
|
||||
|
||||
op +(Decimal, i64) -> Decimal;
|
||||
op -(Decimal, i64) -> Decimal;
|
||||
op *(Decimal, i64) -> Decimal;
|
||||
op /(Decimal, i64) -> Decimal;
|
||||
op %(Decimal, i64) -> Decimal;
|
||||
op **(Decimal, i64) -> Decimal;
|
||||
op ==(Decimal, i64) -> bool;
|
||||
op !=(Decimal, i64) -> bool;
|
||||
op >(Decimal, i64) -> bool;
|
||||
op >=(Decimal, i64) -> bool;
|
||||
op <(Decimal, i64) -> bool;
|
||||
op <=(Decimal, i64) -> bool;
|
||||
op +(Decimal, int) -> Decimal;
|
||||
op -(Decimal, int) -> Decimal;
|
||||
op *(Decimal, int) -> Decimal;
|
||||
op /(Decimal, int) -> Decimal;
|
||||
op %(Decimal, int) -> Decimal;
|
||||
op **(Decimal, int) -> Decimal;
|
||||
op ==(Decimal, int) -> bool;
|
||||
op !=(Decimal, int) -> bool;
|
||||
op >(Decimal, int) -> bool;
|
||||
op >=(Decimal, int) -> bool;
|
||||
op <(Decimal, int) -> bool;
|
||||
op <=(Decimal, int) -> bool;
|
||||
|
||||
op +(i64, Decimal) -> Decimal;
|
||||
op -(i64, Decimal) -> Decimal;
|
||||
op *(i64, Decimal) -> Decimal;
|
||||
op /(i64, Decimal) -> Decimal;
|
||||
op %(i64, Decimal) -> Decimal;
|
||||
op **(i64, Decimal) -> Decimal;
|
||||
op ==(i64, Decimal) -> bool;
|
||||
op !=(i64, Decimal) -> bool;
|
||||
op >(i64, Decimal) -> bool;
|
||||
op >=(i64, Decimal) -> bool;
|
||||
op <(i64, Decimal) -> bool;
|
||||
op <=(i64, Decimal) -> bool;
|
||||
op +(int, Decimal) -> Decimal;
|
||||
op -(int, Decimal) -> Decimal;
|
||||
op *(int, Decimal) -> Decimal;
|
||||
op /(int, Decimal) -> Decimal;
|
||||
op %(int, Decimal) -> Decimal;
|
||||
op **(int, Decimal) -> Decimal;
|
||||
op ==(int, Decimal) -> bool;
|
||||
op !=(int, Decimal) -> bool;
|
||||
op >(int, Decimal) -> bool;
|
||||
op >=(int, Decimal) -> bool;
|
||||
op <(int, Decimal) -> bool;
|
||||
op <=(int, Decimal) -> bool;
|
||||
|
||||
op +(String, String) -> String;
|
||||
op -(String, String) -> String;
|
||||
@ -172,17 +172,17 @@ op ==(Blob, Blob) -> bool;
|
||||
op !=(Blob, Blob) -> bool;
|
||||
|
||||
|
||||
op ==(Range<i64>, RangeInclusive<i64>) -> bool;
|
||||
op !=(Range<i64>, RangeInclusive<i64>) -> bool;
|
||||
op ==(Range<int>, RangeInclusive<int>) -> bool;
|
||||
op !=(Range<int>, RangeInclusive<int>) -> bool;
|
||||
|
||||
op ==(RangeInclusive<i64>, Range<i64>) -> bool;
|
||||
op !=(RangeInclusive<i64>, Range<i64>) -> bool;
|
||||
op ==(RangeInclusive<int>, Range<int>) -> bool;
|
||||
op !=(RangeInclusive<int>, Range<int>) -> bool;
|
||||
|
||||
op ==(Range<i64>, Range<i64>) -> bool;
|
||||
op !=(Range<i64>, Range<i64>) -> bool;
|
||||
op ==(Range<int>, Range<int>) -> bool;
|
||||
op !=(Range<int>, Range<int>) -> bool;
|
||||
|
||||
op ==(RangeInclusive<i64>, RangeInclusive<i64>) -> bool;
|
||||
op !=(RangeInclusive<i64>, RangeInclusive<i64>) -> bool;
|
||||
op ==(RangeInclusive<int>, RangeInclusive<int>) -> bool;
|
||||
op !=(RangeInclusive<int>, RangeInclusive<int>) -> bool;
|
||||
|
||||
op ==(?, ?) -> bool;
|
||||
op !=(?, ?) -> bool;
|
||||
@ -195,31 +195,31 @@ op <=(?, ?) -> bool;
|
||||
op &=(bool, bool);
|
||||
op |=(bool, bool);
|
||||
|
||||
op +=(i64, i64);
|
||||
op -=(i64, i64);
|
||||
op *=(i64, i64);
|
||||
op /=(i64, i64);
|
||||
op %=(i64, i64);
|
||||
op **=(i64, i64);
|
||||
op >>=(i64, i64);
|
||||
op <<=(i64, i64);
|
||||
op &=(i64, i64);
|
||||
op |=(i64, i64);
|
||||
op ^=(i64, i64);
|
||||
op +=(int, int);
|
||||
op -=(int, int);
|
||||
op *=(int, int);
|
||||
op /=(int, int);
|
||||
op %=(int, int);
|
||||
op **=(int, int);
|
||||
op >>=(int, int);
|
||||
op <<=(int, int);
|
||||
op &=(int, int);
|
||||
op |=(int, int);
|
||||
op ^=(int, int);
|
||||
|
||||
op +=(f64, f64);
|
||||
op -=(f64, f64);
|
||||
op *=(f64, f64);
|
||||
op /=(f64, f64);
|
||||
op %=(f64, f64);
|
||||
op **=(f64, f64);
|
||||
op +=(float, float);
|
||||
op -=(float, float);
|
||||
op *=(float, float);
|
||||
op /=(float, float);
|
||||
op %=(float, float);
|
||||
op **=(float, float);
|
||||
|
||||
op +=(f64, i64);
|
||||
op -=(f64, i64);
|
||||
op *=(f64, i64);
|
||||
op /=(f64, i64);
|
||||
op %=(f64, i64);
|
||||
op **=(f64, i64);
|
||||
op +=(float, int);
|
||||
op -=(float, int);
|
||||
op *=(float, int);
|
||||
op /=(float, int);
|
||||
op %=(float, int);
|
||||
op **=(float, int);
|
||||
|
||||
op +=(Decimal, Decimal);
|
||||
op -=(Decimal, Decimal);
|
||||
@ -228,12 +228,12 @@ op /=(Decimal, Decimal);
|
||||
op %=(Decimal, Decimal);
|
||||
op **=(Decimal, Decimal);
|
||||
|
||||
op +=(Decimal, i64);
|
||||
op -=(Decimal, i64);
|
||||
op *=(Decimal, i64);
|
||||
op /=(Decimal, i64);
|
||||
op %=(Decimal, i64);
|
||||
op **=(Decimal, i64);
|
||||
op +=(Decimal, int);
|
||||
op -=(Decimal, int);
|
||||
op *=(Decimal, int);
|
||||
op /=(Decimal, int);
|
||||
op %=(Decimal, int);
|
||||
op **=(Decimal, int);
|
||||
|
||||
op +=(String, String);
|
||||
op -=(String, String);
|
||||
@ -246,7 +246,7 @@ op +=(Array, Array);
|
||||
op +=(Array, ?);
|
||||
|
||||
op +=(Blob, Blob);
|
||||
op +=(Blob, i64);
|
||||
op +=(Blob, int);
|
||||
op +=(Blob, char);
|
||||
op +=(Blob, String);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
module general_kenobi;
|
||||
|
||||
/// Returns a string where "hello there" is repeated `n` times.
|
||||
fn hello_there(n: i64) -> String;
|
||||
fn hello_there(n: int) -> String;
|
@ -1,16 +1,16 @@
|
||||
module static;
|
||||
|
||||
op ==(i64, i64) -> bool;
|
||||
op !=(i64, i64) -> bool;
|
||||
op >(i64, i64) -> bool;
|
||||
op >=(i64, i64) -> bool;
|
||||
op <(i64, i64) -> bool;
|
||||
op <=(i64, i64) -> bool;
|
||||
op &(i64, i64) -> i64;
|
||||
op |(i64, i64) -> i64;
|
||||
op ^(i64, i64) -> i64;
|
||||
op ..(i64, i64) -> Range<i64>;
|
||||
op ..=(i64, i64) -> RangeInclusive<i64>;
|
||||
op ==(int, int) -> bool;
|
||||
op !=(int, int) -> bool;
|
||||
op >(int, int) -> bool;
|
||||
op >=(int, int) -> bool;
|
||||
op <(int, int) -> bool;
|
||||
op <=(int, int) -> bool;
|
||||
op &(int, int) -> int;
|
||||
op |(int, int) -> int;
|
||||
op ^(int, int) -> int;
|
||||
op ..(int, int) -> Range<int>;
|
||||
op ..=(int, int) -> RangeInclusive<int>;
|
||||
|
||||
op ==(bool, bool) -> bool;
|
||||
op !=(bool, bool) -> bool;
|
||||
@ -29,53 +29,53 @@ op >=((), ()) -> bool;
|
||||
op <((), ()) -> bool;
|
||||
op <=((), ()) -> bool;
|
||||
|
||||
op +(i64, i64) -> i64;
|
||||
op -(i64, i64) -> i64;
|
||||
op *(i64, i64) -> i64;
|
||||
op /(i64, i64) -> i64;
|
||||
op %(i64, i64) -> i64;
|
||||
op **(i64, i64) -> i64;
|
||||
op >>(i64, i64) -> i64;
|
||||
op <<(i64, i64) -> i64;
|
||||
op +(int, int) -> int;
|
||||
op -(int, int) -> int;
|
||||
op *(int, int) -> int;
|
||||
op /(int, int) -> int;
|
||||
op %(int, int) -> int;
|
||||
op **(int, int) -> int;
|
||||
op >>(int, int) -> int;
|
||||
op <<(int, int) -> int;
|
||||
|
||||
op +(f64, f64) -> f64;
|
||||
op -(f64, f64) -> f64;
|
||||
op *(f64, f64) -> f64;
|
||||
op /(f64, f64) -> f64;
|
||||
op %(f64, f64) -> f64;
|
||||
op **(f64, f64) -> f64;
|
||||
op ==(f64, f64) -> bool;
|
||||
op !=(f64, f64) -> bool;
|
||||
op >(f64, f64) -> bool;
|
||||
op >=(f64, f64) -> bool;
|
||||
op <(f64, f64) -> bool;
|
||||
op <=(f64, f64) -> bool;
|
||||
op +(float, float) -> float;
|
||||
op -(float, float) -> float;
|
||||
op *(float, float) -> float;
|
||||
op /(float, float) -> float;
|
||||
op %(float, float) -> float;
|
||||
op **(float, float) -> float;
|
||||
op ==(float, float) -> bool;
|
||||
op !=(float, float) -> bool;
|
||||
op >(float, float) -> bool;
|
||||
op >=(float, float) -> bool;
|
||||
op <(float, float) -> bool;
|
||||
op <=(float, float) -> bool;
|
||||
|
||||
op +(f64, i64) -> f64;
|
||||
op -(f64, i64) -> f64;
|
||||
op *(f64, i64) -> f64;
|
||||
op /(f64, i64) -> f64;
|
||||
op %(f64, i64) -> f64;
|
||||
op **(f64, i64) -> f64;
|
||||
op ==(f64, i64) -> bool;
|
||||
op !=(f64, i64) -> bool;
|
||||
op >(f64, i64) -> bool;
|
||||
op >=(f64, i64) -> bool;
|
||||
op <(f64, i64) -> bool;
|
||||
op <=(f64, i64) -> bool;
|
||||
op +(float, int) -> float;
|
||||
op -(float, int) -> float;
|
||||
op *(float, int) -> float;
|
||||
op /(float, int) -> float;
|
||||
op %(float, int) -> float;
|
||||
op **(float, int) -> float;
|
||||
op ==(float, int) -> bool;
|
||||
op !=(float, int) -> bool;
|
||||
op >(float, int) -> bool;
|
||||
op >=(float, int) -> bool;
|
||||
op <(float, int) -> bool;
|
||||
op <=(float, int) -> bool;
|
||||
|
||||
op +(i64, f64) -> f64;
|
||||
op -(i64, f64) -> f64;
|
||||
op *(i64, f64) -> f64;
|
||||
op /(i64, f64) -> f64;
|
||||
op %(i64, f64) -> f64;
|
||||
op **(i64, f64) -> f64;
|
||||
op ==(i64, f64) -> bool;
|
||||
op !=(i64, f64) -> bool;
|
||||
op >(i64, f64) -> bool;
|
||||
op >=(i64, f64) -> bool;
|
||||
op <(i64, f64) -> bool;
|
||||
op <=(i64, f64) -> bool;
|
||||
op +(int, float) -> float;
|
||||
op -(int, float) -> float;
|
||||
op *(int, float) -> float;
|
||||
op /(int, float) -> float;
|
||||
op %(int, float) -> float;
|
||||
op **(int, float) -> float;
|
||||
op ==(int, float) -> bool;
|
||||
op !=(int, float) -> bool;
|
||||
op >(int, float) -> bool;
|
||||
op >=(int, float) -> bool;
|
||||
op <(int, float) -> bool;
|
||||
op <=(int, float) -> bool;
|
||||
|
||||
op +(Decimal, Decimal) -> Decimal;
|
||||
op -(Decimal, Decimal) -> Decimal;
|
||||
@ -90,31 +90,31 @@ op >=(Decimal, Decimal) -> bool;
|
||||
op <(Decimal, Decimal) -> bool;
|
||||
op <=(Decimal, Decimal) -> bool;
|
||||
|
||||
op +(Decimal, i64) -> Decimal;
|
||||
op -(Decimal, i64) -> Decimal;
|
||||
op *(Decimal, i64) -> Decimal;
|
||||
op /(Decimal, i64) -> Decimal;
|
||||
op %(Decimal, i64) -> Decimal;
|
||||
op **(Decimal, i64) -> Decimal;
|
||||
op ==(Decimal, i64) -> bool;
|
||||
op !=(Decimal, i64) -> bool;
|
||||
op >(Decimal, i64) -> bool;
|
||||
op >=(Decimal, i64) -> bool;
|
||||
op <(Decimal, i64) -> bool;
|
||||
op <=(Decimal, i64) -> bool;
|
||||
op +(Decimal, int) -> Decimal;
|
||||
op -(Decimal, int) -> Decimal;
|
||||
op *(Decimal, int) -> Decimal;
|
||||
op /(Decimal, int) -> Decimal;
|
||||
op %(Decimal, int) -> Decimal;
|
||||
op **(Decimal, int) -> Decimal;
|
||||
op ==(Decimal, int) -> bool;
|
||||
op !=(Decimal, int) -> bool;
|
||||
op >(Decimal, int) -> bool;
|
||||
op >=(Decimal, int) -> bool;
|
||||
op <(Decimal, int) -> bool;
|
||||
op <=(Decimal, int) -> bool;
|
||||
|
||||
op +(i64, Decimal) -> Decimal;
|
||||
op -(i64, Decimal) -> Decimal;
|
||||
op *(i64, Decimal) -> Decimal;
|
||||
op /(i64, Decimal) -> Decimal;
|
||||
op %(i64, Decimal) -> Decimal;
|
||||
op **(i64, Decimal) -> Decimal;
|
||||
op ==(i64, Decimal) -> bool;
|
||||
op !=(i64, Decimal) -> bool;
|
||||
op >(i64, Decimal) -> bool;
|
||||
op >=(i64, Decimal) -> bool;
|
||||
op <(i64, Decimal) -> bool;
|
||||
op <=(i64, Decimal) -> bool;
|
||||
op +(int, Decimal) -> Decimal;
|
||||
op -(int, Decimal) -> Decimal;
|
||||
op *(int, Decimal) -> Decimal;
|
||||
op /(int, Decimal) -> Decimal;
|
||||
op %(int, Decimal) -> Decimal;
|
||||
op **(int, Decimal) -> Decimal;
|
||||
op ==(int, Decimal) -> bool;
|
||||
op !=(int, Decimal) -> bool;
|
||||
op >(int, Decimal) -> bool;
|
||||
op >=(int, Decimal) -> bool;
|
||||
op <(int, Decimal) -> bool;
|
||||
op <=(int, Decimal) -> bool;
|
||||
|
||||
op +(String, String) -> String;
|
||||
op -(String, String) -> String;
|
||||
@ -172,17 +172,17 @@ op ==(Blob, Blob) -> bool;
|
||||
op !=(Blob, Blob) -> bool;
|
||||
|
||||
|
||||
op ==(Range<i64>, RangeInclusive<i64>) -> bool;
|
||||
op !=(Range<i64>, RangeInclusive<i64>) -> bool;
|
||||
op ==(Range<int>, RangeInclusive<int>) -> bool;
|
||||
op !=(Range<int>, RangeInclusive<int>) -> bool;
|
||||
|
||||
op ==(RangeInclusive<i64>, Range<i64>) -> bool;
|
||||
op !=(RangeInclusive<i64>, Range<i64>) -> bool;
|
||||
op ==(RangeInclusive<int>, Range<int>) -> bool;
|
||||
op !=(RangeInclusive<int>, Range<int>) -> bool;
|
||||
|
||||
op ==(Range<i64>, Range<i64>) -> bool;
|
||||
op !=(Range<i64>, Range<i64>) -> bool;
|
||||
op ==(Range<int>, Range<int>) -> bool;
|
||||
op !=(Range<int>, Range<int>) -> bool;
|
||||
|
||||
op ==(RangeInclusive<i64>, RangeInclusive<i64>) -> bool;
|
||||
op !=(RangeInclusive<i64>, RangeInclusive<i64>) -> bool;
|
||||
op ==(RangeInclusive<int>, RangeInclusive<int>) -> bool;
|
||||
op !=(RangeInclusive<int>, RangeInclusive<int>) -> bool;
|
||||
|
||||
op ==(?, ?) -> bool;
|
||||
op !=(?, ?) -> bool;
|
||||
@ -195,31 +195,31 @@ op <=(?, ?) -> bool;
|
||||
op &=(bool, bool);
|
||||
op |=(bool, bool);
|
||||
|
||||
op +=(i64, i64);
|
||||
op -=(i64, i64);
|
||||
op *=(i64, i64);
|
||||
op /=(i64, i64);
|
||||
op %=(i64, i64);
|
||||
op **=(i64, i64);
|
||||
op >>=(i64, i64);
|
||||
op <<=(i64, i64);
|
||||
op &=(i64, i64);
|
||||
op |=(i64, i64);
|
||||
op ^=(i64, i64);
|
||||
op +=(int, int);
|
||||
op -=(int, int);
|
||||
op *=(int, int);
|
||||
op /=(int, int);
|
||||
op %=(int, int);
|
||||
op **=(int, int);
|
||||
op >>=(int, int);
|
||||
op <<=(int, int);
|
||||
op &=(int, int);
|
||||
op |=(int, int);
|
||||
op ^=(int, int);
|
||||
|
||||
op +=(f64, f64);
|
||||
op -=(f64, f64);
|
||||
op *=(f64, f64);
|
||||
op /=(f64, f64);
|
||||
op %=(f64, f64);
|
||||
op **=(f64, f64);
|
||||
op +=(float, float);
|
||||
op -=(float, float);
|
||||
op *=(float, float);
|
||||
op /=(float, float);
|
||||
op %=(float, float);
|
||||
op **=(float, float);
|
||||
|
||||
op +=(f64, i64);
|
||||
op -=(f64, i64);
|
||||
op *=(f64, i64);
|
||||
op /=(f64, i64);
|
||||
op %=(f64, i64);
|
||||
op **=(f64, i64);
|
||||
op +=(float, int);
|
||||
op -=(float, int);
|
||||
op *=(float, int);
|
||||
op /=(float, int);
|
||||
op %=(float, int);
|
||||
op **=(float, int);
|
||||
|
||||
op +=(Decimal, Decimal);
|
||||
op -=(Decimal, Decimal);
|
||||
@ -228,12 +228,12 @@ op /=(Decimal, Decimal);
|
||||
op %=(Decimal, Decimal);
|
||||
op **=(Decimal, Decimal);
|
||||
|
||||
op +=(Decimal, i64);
|
||||
op -=(Decimal, i64);
|
||||
op *=(Decimal, i64);
|
||||
op /=(Decimal, i64);
|
||||
op %=(Decimal, i64);
|
||||
op **=(Decimal, i64);
|
||||
op +=(Decimal, int);
|
||||
op -=(Decimal, int);
|
||||
op *=(Decimal, int);
|
||||
op /=(Decimal, int);
|
||||
op %=(Decimal, int);
|
||||
op **=(Decimal, int);
|
||||
|
||||
op +=(String, String);
|
||||
op -=(String, String);
|
||||
@ -246,7 +246,7 @@ op +=(Array, Array);
|
||||
op +=(Array, ?);
|
||||
|
||||
op +=(Blob, Blob);
|
||||
op +=(Blob, i64);
|
||||
op +=(Blob, int);
|
||||
op +=(Blob, char);
|
||||
op +=(Blob, String);
|
||||
|
||||
|
@ -4,11 +4,11 @@
|
||||
use crate::module::FuncInfo;
|
||||
use crate::plugin::*;
|
||||
use crate::tokenizer::is_valid_function_name;
|
||||
use crate::{Engine, Module, Scope};
|
||||
use crate::{Engine, Module, Scope, INT};
|
||||
|
||||
#[cfg(feature = "no_std")]
|
||||
use std::prelude::v1::*;
|
||||
use std::{borrow::Cow, cmp::Ordering, fmt};
|
||||
use std::{any::type_name, borrow::Cow, cmp::Ordering, fmt};
|
||||
|
||||
impl Engine {
|
||||
/// Return [`Definitions`] that can be used to generate definition files for the [`Engine`].
|
||||
@ -345,13 +345,19 @@ fn def_type_name<'a>(ty: &'a str, engine: &'a Engine) -> Cow<'a, str> {
|
||||
.map(str::trim)
|
||||
.unwrap_or(ty);
|
||||
|
||||
ty.replace("Iterator<Item=", "Iterator<")
|
||||
let ty = ty
|
||||
.replace("Iterator<Item=", "Iterator<")
|
||||
.replace("Dynamic", "?")
|
||||
.replace("INT", "int")
|
||||
.replace(type_name::<INT>(), "int")
|
||||
.replace("FLOAT", "float")
|
||||
.replace("&str", "String")
|
||||
.replace("ImmutableString", "String")
|
||||
.into()
|
||||
.replace("ImmutableString", "String");
|
||||
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
let ty = ty.replace(type_name::<crate::FLOAT>(), "float");
|
||||
|
||||
ty.into()
|
||||
}
|
||||
|
||||
impl Scope<'_> {
|
||||
|
Loading…
Reference in New Issue
Block a user