Added usage of abstract generator logic in new compiler.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>