Skip to content

Commit 933e06d

Browse files
authored
Iterators - Fixed skip #514 (#516)
* Iterators - Fixed skip #514 * Also fix builder
1 parent 848c8f5 commit 933e06d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

static/extensions/Div/divIterators.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
}, this.clonable)
239239
}
240240
skip(count) {
241-
return iter.chainIter({kind: "Skip", args: [count]},
241+
return this.chainIter({kind: "Skip", args: [count]},
242242
{iter: this, count}, function*(state, thread, target, runtime, stage) {
243243
while(state.count > 0) {
244244
const item = yield* state.iter.next(thread, target, runtime, stage);
@@ -1083,9 +1083,9 @@
10831083
iterBuilder(node, compiler, imports) {
10841084
const state = compiler.descendInput(node.STATE).asUnknown();
10851085
const next = descendSubstack(compiler, node.NEXT, new imports.Frame(false, "_divIterBuilder"))
1086-
+`\nreturn vm.IteratorType.Item("");\n`
1086+
+`\nreturn vm.divIterator.Type.Item("");\n`
10871087
return new imports.TypedInput(
1088-
/*js*/`vm.divIterator.Type.iterBuilder(\n`
1088+
/*js*/`new vm.divIterator.Type("Custom",\n`
10891089
+` ${state},\n`
10901090
+` ${substackThunk(compiler, next, '_divIterState')}\n`
10911091
+`)\n`
@@ -1104,11 +1104,11 @@
11041104
iterBuilderItem(node, compiler, imports) {
11051105
if(!compiler.frames.some(f => f.parent === "_divIterBuilder")) return;
11061106
const item = compiler.descendInput(node.ITEM).asUnknown()
1107-
compiler.source += `return vm.IteratorType.Item(${item});`
1107+
compiler.source += `return vm.divIterator.Type.Item(${item});`
11081108
},
11091109
iterBuilderDone(node, compiler, imports) {
11101110
if(!compiler.frames.some(f => f.parent === "_divIterBuilder")) return;
1111-
compiler.source += `return vm.IteratorType.Done();`
1111+
compiler.source += `return vm.divIterator.Type.Done();`
11121112
},
11131113

11141114
iterAdapterMap(node, compiler, imports) {

0 commit comments

Comments
 (0)