(input, output)
| 1804 | } |
| 1805 | |
| 1806 | function generatorResult(input, output) { |
| 1807 | var retObj = new Obj(true) |
| 1808 | retObj.defProp("done").addType(cx.bool) |
| 1809 | output.propagate(retObj.defProp("value")) |
| 1810 | var method = new Fn(null, ANull, input ? [input] : [], input ? ["?"] : [], retObj) |
| 1811 | var result = new Obj(cx.definitions.ecmascript && cx.definitions.ecmascript.generator_prototype || true) |
| 1812 | result.defProp("next").addType(method) |
| 1813 | return result |
| 1814 | } |
| 1815 | |
| 1816 | function maybeIterator(fn, output) { |
| 1817 | if (!fn.generator) return output |
no test coverage detected