hcl/hcl/printer
Fatih Arslan d45f5d133c ast: change signature of Walk() to allow rewriting AST
With the previous Walk function it's not easy to rewrite the node as we
don't have any kind of reference to the parent. If we want to rewrite a
given AST, we have to manually traverse it as Walk is not usable. To
allow us rewriting the AST we change the signature of the function
passed to Walk. It'll allow us to rewrite the AST and return back.
Internally Walk() overrides the returned AST.

This idea was also talked here:
https://groups.google.com/forum/#!topic/golang-nuts/cRZQV36IckM
extensively.
2015-11-14 21:58:31 +02:00
..
testdata hcl/printer: clear trailing newline from heredoc 2015-11-10 15:02:21 -08:00
nodes.go ast: change signature of Walk() to allow rewriting AST 2015-11-14 21:58:31 +02:00
printer_test.go move hclnew to hcl 2015-11-06 16:04:20 -08:00
printer.go hcl/printer: unindent for heredocs 2015-11-10 14:54:46 -08:00