iterators now return tyIter(T);

tyIter(T) represents an "iteration yielding values of type T"

I'm planning to use that in the context of the `is` operator
supporting predicates such as `C.items is iterator` and also
in the upcoming support for higher-order inline iterators.
This commit is contained in:
Zahary Karadjov 2014-03-05 01:14:37 +02:00
commit 5324c9ebba
6 changed files with 18 additions and 11 deletions

View file

@ -146,7 +146,7 @@ proc newProc*(prc: PSym, module: BModule): BProc =
result.nestedTryStmts = @[]
result.finallySafePoints = @[]
iterator cgenModules*: var BModule =
iterator cgenModules*: BModule =
for i in 0..high(gModules):
# ultimately, we are iterating over the file ids here.
# some "files" won't have an associated cgen module (like stdin)