<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 24, 2017, at 10:56 PM, John McCall via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Or if you really want to avoid the FFI, you could take our current ASTDumper output, which is currently pseudo-machine-readable, and make it actually machine-readable. The elegant approach there would be to take the entire dumper and remove its pervasive dependence on an output stream; instead, it would be rewritten to make calls on a SAX-like streaming interface, and there would just be a standard implementation that formatted things as XML / JSON / our weird s-expression format.</span></div></blockquote></div><br class=""><div class="">… I would love it if ASTDumper supported a Clang-like tree view in addition to (or instead of, if we also get JSON output?) the faux s-expression output. I know I’m supposed to like Lisp, but I personally find our dump output rather hard to read.</div><div class=""><br class=""></div><div class="">Slava</div></body></html>