Commit Graph

5 Commits

Author SHA1 Message Date
Roger Peppe
fde815f6a1 godoc.org-compatible ast package
Change the dump code so that it hides the values of variable
definitions if they're large. This means that godoc.org should
be able to deal with the output, and the godoc output is
readable without needing to read through a huge struct literal definition.

Other approaches might be to always generate an extra variable
(seems unnecessary) or to pass to writer explicitly to the dump
methods rather than swapping s.w out temporarily. The former
seems unnecessarily intrusive to the usual output; the latter
seemed unnecessarily intrusive to the source itself.
YMMV.
2018-04-12 14:06:52 -04:00
Dave Cunningham
0b46b25f0f Update to cpp jsonnet 2018-03-16 22:20:53 -04:00
Marcelo Cantos
88519c3704 Apply more golint recommendations (#201)
* Apply more golint recommendations

* Update dumpstdlibast.go to include StdAst comment

* Improve dump.go package comment.
2018-02-28 01:11:18 -05:00
Dave Cunningham
b04e73e163 Fix unparsing of enums, avoid static type error 2017-11-08 11:28:38 -05:00
Liang Mingqiang
aeda6138e5 experiment dump ast to source code (#101)
* Add facility to dump part of Go heap as Go code.

* Generate stdlib AST as Go code

* Use hardcoded stdlib AST instead of parsing it
2017-11-07 23:31:11 -05:00