Currently there are a methods such as PrintSyntaxTree and PrettyPrintSyntaxTree. This is convenient if you want it printed to stdout, but not so much if you want to put it in a test log, or compare it's output for testing. There is WriteSyntaxTree, but that requires an io.Reader, so it's much less convenient.
I'm not 100% on the name though. One alternative would be Sprint, which is what the fmt package uses.
I can write the changes, but I'd like to get some feedback on the name first (although I might just write it and change the names later).
Currently there are a methods such as
PrintSyntaxTreeandPrettyPrintSyntaxTree. This is convenient if you want it printed to stdout, but not so much if you want to put it in a test log, or compare it's output for testing. There isWriteSyntaxTree, but that requires anio.Reader, so it's much less convenient.I'm not 100% on the name though. One alternative would be Sprint, which is what the
fmtpackage uses.I can write the changes, but I'd like to get some feedback on the name first (although I might just write it and change the names later).