Documentation ¶
Overview ¶
Package printer implements printing of AST nodes.
Index ¶
Constants ¶
View Source
const ( RawFormat uint = 1 << iota // do not use a tabwriter; if set, UseSpaces is ignored TabIndent // use tabs for indentation independent of UseSpaces UseSpaces // use spaces instead of tabs for alignment )
General printing is controlled with these Config.Mode flags.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
A Config node controls the output of Fprint.
func (*Config) Fprint ¶
Fprint "pretty-prints" an AST node to output and returns the number of bytes written and an error (if any) for a given configuration cfg. Position information is interpreted relative to the file set fset. The node type must be *ast.File, or assignment-compatible to ast.Expr, ast.Decl, ast.Spec, or ast.Stmt.
Click to show internal directories.
Click to hide internal directories.