// Generated by Lisette bindgen
// Source: go/printer (Go stdlib)
// Go: 1.25.5
// Lisette: 0.1.12
import "go:go/ast"
import "go:go/token"
import "go:io"
/// Fprint "pretty-prints" an AST node to output.
/// It calls [Config.Fprint] with default settings.
/// Note that gofmt uses tabs for indentation but spaces for alignment;
/// use format.Node (package go/format) for output that matches gofmt.
pub fn Fprint(output: io.Writer, fset: Ref<token.FileSet>, node: Unknown) -> Result<(), error>
/// A CommentedNode bundles an AST node and corresponding comments.
/// It may be provided as argument to any of the [Fprint] functions.
pub struct CommentedNode {
pub Node: Unknown,
pub Comments: Slice<Option<Ref<ast.CommentGroup>>>,
}
/// A Config node controls the output of Fprint.
pub struct Config {
pub Mode: Mode,
pub Tabwidth: int,
pub Indent: int,
}
/// A Mode value is a set of flags (or 0). They control printing.
pub struct Mode(uint)
const RawFormat: Mode = 1
const SourcePos: Mode = 8
const TabIndent: Mode = 2
const UseSpaces: Mode = 4
impl Config {
/// Fprint "pretty-prints" an AST node to output for a given configuration cfg.
/// Position information is interpreted relative to the file set fset.
/// The node type must be *[ast.File], *[CommentedNode], [][ast.Decl], [][ast.Stmt],
/// or assignment-compatible to [ast.Expr], [ast.Decl], [ast.Spec], or [ast.Stmt].
fn Fprint(
self: Ref<Config>,
output: io.Writer,
fset: Ref<token.FileSet>,
node: Unknown,
) -> Result<(), error>
}