uastyaml

package
v3.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(n nodes.Node) ([]byte, error)

Marshal encode the UAST to a human-readable YAML.

func Unmarshal

func Unmarshal(data []byte) (nodes.Node, error)

Unmarshal decodes YAML to a UAST.

Types

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

Encoder is a YAML encoder for UAST.

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

NewEncoder creates a YAML encoder for UAST.

func (*Encoder) Encode

func (enc *Encoder) Encode(n nodes.Node) error

func (*Encoder) ForceRoles

func (enc *Encoder) ForceRoles(enable bool)

ForceRoles will force an output of Unannotated roles fiend for nodes that don't have roles.

Jump to

Keyboard shortcuts

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