This is similar to my asyncscript pet project[1] (that was met with much resistance on the Node.js mailing list as it was Yet Another CPS Framework). It drew inspiration from the way that C# creates the state machines for "yield" and "await". The project is dead (it only dealt with async calls and I never got round to "enumeration generators"), but if you are wondering how regenerator works I have a nice explanation at the bottom of readme.md.
[1]: https://github.com/jcdickinson/asyncscript