astprint

package
v0.0.0-...-70fd0a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package astprint contains types and functions for printing and formatting string representation of YAML AST.

Index

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) Print

func (p *Printer) Print(root ast.Node, w io.Writer) error

Print writes string representation of ast.Node into io.Writer

func (*Printer) VisitAliasNode

func (*Printer) VisitAliasNode(*ast.AliasNode)

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) VisitNullNode(*ast.NullNode)

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) VisitTagNode(*ast.TagNode)

func (*Printer) VisitTextNode

func (*Printer) VisitTextNode(*ast.TextNode)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL