| 302 | } |
| 303 | |
| 304 | txBoolean fxGetIterator(txMachine* the, txSlot* iterable, txSlot* iterator, txSlot* next, txBoolean optional) |
| 305 | { |
| 306 | mxPushSlot(iterable); |
| 307 | mxDub(); |
| 308 | mxGetID(mxID(_Symbol_iterator)); |
| 309 | if (optional && (mxIsUndefined(the->stack) || mxIsNull(the->stack))) { |
| 310 | mxPop(); |
| 311 | mxPop(); |
| 312 | return 0; |
| 313 | } |
| 314 | mxCall(); |
| 315 | mxRunCount(0); |
| 316 | if (!mxIsReference(the->stack)) |
| 317 | mxTypeError("iterator: not an object"); |
| 318 | if (next) { |
| 319 | mxDub(); |
| 320 | mxGetID(mxID(_next)); |
| 321 | mxPullSlot(next); |
| 322 | } |
| 323 | mxPullSlot(iterator); |
| 324 | return 1; |
| 325 | } |
| 326 | |
| 327 | txBoolean fxGetIteratorFlattenable(txMachine* the, txSlot* iterable, txSlot* iterator, txSlot* next, txBoolean optional) |
| 328 | { |
no outgoing calls
no test coverage detected