prettifier

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package prettifier decorates Watson Representation by adding some meaningless `vm.Op`s.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prettifier

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

Preffifier behaves as a lexer.OpWriter and writes some meaningless Ops to its underlying OpWriter in addition to any Ops that are written.

func NewPrettifier

func NewPrettifier(w lexer.OpWriter) *Prettifier

NewPrettifier returns a new Prettifier.

func (*Prettifier) Mode

func (p *Prettifier) Mode() lexer.Mode

Mode returns the Prettifier's current mode.

func (*Prettifier) Write

func (p *Prettifier) Write(op vm.Op) error

Write writes op to the underlying OpWriter. It sometimes writes one or more extra Ops to decorate output.

Jump to

Keyboard shortcuts

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