| 6980 | } |
| 6981 | } |
| 6982 | _continueLoop(context, iteratorInfo, loopVal) { |
| 6983 | var currentIndex = iteratorInfo.index; |
| 6984 | if (iteratorInfo.value) { |
| 6985 | context.result = context.locals[this.identifier] = loopVal; |
| 6986 | } else { |
| 6987 | context.result = currentIndex; |
| 6988 | } |
| 6989 | if (this.indexIdentifier) { |
| 6990 | context.locals[this.indexIdentifier] = currentIndex; |
| 6991 | } |
| 6992 | if (context.meta.__ht_template_result && iteratorInfo.value) { |
| 6993 | var scopes = context.meta.__ht_scopes || (context.meta.__ht_scopes = {}); |
| 6994 | if (!scopes[this.slot]) { |
| 6995 | scopes[this.slot] = { |
| 6996 | identifier: this.identifier, |
| 6997 | indexIdentifier: this.indexIdentifier, |
| 6998 | source: iteratorInfo.value |
| 6999 | }; |
| 7000 | } |
| 7001 | context.meta.__ht_template_result.push( |
| 7002 | "<!--hs-scope:" + this.slot + ":" + currentIndex + "-->" |
| 7003 | ); |
| 7004 | } |
| 7005 | iteratorInfo.didIterate = true; |
| 7006 | iteratorInfo.index++; |
| 7007 | return this.loop; |
| 7008 | } |
| 7009 | _endLoop(context, iteratorInfo) { |
| 7010 | var didIterate = iteratorInfo.didIterate; |
| 7011 | context.meta.iterators[this.slot] = null; |