Re:Just what does “code as data” mean anyway? (2014)
by pjc50 on Friday February 16, 2018 @10:45AM
(#16393103)
Not a decompiler, but what would otherwise be called a "pretty-printer" of the AST or intermediate representation.
I've definitely got a use case for an XML version of this - a means of modifying a large file without affecting its indentation or re-ordering attributes in areas that have not changed.
Whitespace is easy, btw. Just enforce code style in the language like gofmt. You don't need to preserve what you can derive programmatically. As a bonus, gofmt is awesome.