NativeIterator.hx 669 B

12345678910111213141516171819
  1. package python;
  2. import python.NativeIterable.NativeIterableRaw;
  3. abstract NativeIterator <T>(NativeIteratorRaw<T>) to NativeIteratorRaw<T> to NativeIterable<T> {
  4. public inline function new (p:NativeIteratorRaw<T>) this = p;
  5. @:to public static inline function toHaxeIterator <T>(p:NativeIteratorRaw<T>):HaxeIterator<T> return new HaxeIterator(p);
  6. @:to public static inline function toNativeIterable <T>(p:NativeIteratorRaw<T>):NativeIterable<T> return p;
  7. public function getNativeIteratorRaw <T>():NativeIteratorRaw<T> return this;
  8. }
  9. typedef NativeIteratorRaw<T> = {
  10. > NativeIterableRaw<T>,
  11. function __next__ ():T;
  12. //function __iter__ ():NativeIterator<T>;
  13. }