go/printer: leave indentation alone when printing nodes from different files
ASTs may be created by various tools and built from nodes of different files. An incorrectly constructed AST will likely not print at all, but a (structurally) correct AST with bad position information should still print structurally correct. One heuristic used was to reset indentation when the filename in the position information of nodes changed. However, this can lead to wrong indentation for structurally correct ASTs. Fix: Don't change the indentation in this case. Related to issue 4300. R=r CC=golang-dev https://golang.org/cl/6849066
Showing
Please
register
or
sign in
to comment