translate await-like exressions inside inline functions to calls of appropriative async functions.
(or show error if not found).
x.foreach{ x => p; await(x); .. }
become
await( transform-defer( x.foreachAsync{ x => async(p; await(x); ..) }) )
(note, that channel.read macroses are expanded to await-s on this point)
2. transform defer calls if defer statement is found inside go:
asnyc{ p .. defer(x) .. }
become (reallity is a little complext, here is just idea)
{ val d = new Defers(); async{ p .. d.defer(x) .. }.onComplete(d.tryProcess) }
async arround go.
Basicly go is
x.foreach{ x => p; await(x); .. }
become
await( transform-defer( x.foreachAsync{ x => async(p; await(x); ..) }) )
(note, that channel.read macroses are expanded to await-s on this point)
2. transform defer calls if defer statement is found inside go:
asnyc{ p .. defer(x) .. }
become (reallity is a little complext, here is just idea)
{ val d = new Defers(); async{ p .. d.defer(x) .. }.onComplete(d.tryProcess) }