Is there a way to invoke swiftc -print-ast in a way that prints function bodies? If not, how's the idea of adding a flag to enable that?
Motivation: I’d like to see what synthesized code (e.g. function builder code) looks like in printed form, not in the less readable swiftc -dump-ast s-expr form.
I believe PrintOptions in the compiler has all kinds of knobs for toggling printing behavior, including "print declaration bodies". Exposing these knobs as additional flags to swiftc -print-ast may take some design.
AFAIK, we don't have Expr printer so far. Although .swiftinterface printer prints @inlinable function bodies, it just copies text from the source code.