Documentation ¶
Overview ¶
Package astprint contains types and functions for printing and formatting string representation of YAML AST.
Index ¶
- type Printer
- func (p *Printer) Print(root ast.Node, w io.Writer) error
- func (*Printer) VisitAliasNode(*ast.AliasNode)
- func (*Printer) VisitAnchorNode(*ast.AnchorNode)
- func (p *Printer) VisitContentNode(n *ast.ContentNode)
- func (p *Printer) VisitMappingEntryNode(n *ast.MappingEntryNode)
- func (p *Printer) VisitMappingNode(n *ast.MappingNode)
- func (*Printer) VisitNullNode(*ast.NullNode)
- func (p *Printer) VisitPropertiesNode(n *ast.PropertiesNode)
- func (p *Printer) VisitSequenceNode(n *ast.SequenceNode)
- func (p *Printer) VisitStreamNode(n *ast.StreamNode)
- func (*Printer) VisitTagNode(*ast.TagNode)
- func (*Printer) VisitTextNode(*ast.TextNode)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer implements AST printing logic. Inspired by github.com/xlab/treeprint
func NewPrinter ¶
func NewPrinter() *Printer
func (*Printer) VisitAliasNode ¶
func (*Printer) VisitAnchorNode ¶
func (*Printer) VisitAnchorNode(*ast.AnchorNode)
func (*Printer) VisitContentNode ¶
func (p *Printer) VisitContentNode(n *ast.ContentNode)
func (*Printer) VisitMappingEntryNode ¶
func (p *Printer) VisitMappingEntryNode(n *ast.MappingEntryNode)
func (*Printer) VisitMappingNode ¶
func (p *Printer) VisitMappingNode(n *ast.MappingNode)
func (*Printer) VisitNullNode ¶
func (*Printer) VisitPropertiesNode ¶
func (p *Printer) VisitPropertiesNode(n *ast.PropertiesNode)
func (*Printer) VisitSequenceNode ¶
func (p *Printer) VisitSequenceNode(n *ast.SequenceNode)
func (*Printer) VisitStreamNode ¶
func (p *Printer) VisitStreamNode(n *ast.StreamNode)
func (*Printer) VisitTagNode ¶
func (*Printer) VisitTextNode ¶
Click to show internal directories.
Click to hide internal directories.