WriteTo writes the tokens underlying the receiving file to the given writer. The tokens first have a simple formatting pass applied that adjusts only the spaces between them.
(wr io.Writer)
| 37 | // The tokens first have a simple formatting pass applied that adjusts only |
| 38 | // the spaces between them. |
| 39 | func (f *File) WriteTo(wr io.Writer) (int64, error) { |
| 40 | tokens := f.children.BuildTokens(nil) |
| 41 | format(tokens) |
| 42 | return tokens.WriteTo(wr) |
| 43 | } |
| 44 | |
| 45 | // Bytes returns a buffer containing the source code resulting from the |
| 46 | // tokens underlying the receiving file. If any updates have been made via |