printer

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 7 Imported by: 8 modules, 14 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package printer provides a human-readable printer for the semantic tree nodes.

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 exposes methods for appending string representations of semantic Statements, Expressions and Types. While the strings generated closely match the syntax of the API file, the Printer has been written to aid in debugging, and may not produce parseable output.

func New

func New() *Printer

New returns a new Printer.

func (Printer) String

func (p Printer) String() string

func (*Printer) WriteExpression

func (p *Printer) WriteExpression(n semantic.Expression) *Printer

WriteExpression appends the string representation of n to the Printer's buffer.

func (*Printer) WriteFunction

func (p *Printer) WriteFunction(f *semantic.Function) *Printer

WriteFunction appends the string representation of f to the Printer's buffer.

func (*Printer) WriteRune

func (p *Printer) WriteRune(r rune)

WriteRune appends r cto the Printer's buffer.

func (*Printer) WriteStatement

func (p *Printer) WriteStatement(n semantic.Node) *Printer

WriteStatement appends the string representation of n to the Printer's buffer.

func (*Printer) WriteString

func (p *Printer) WriteString(s string)

WriteString appends s to the Printer's buffer.

func (*Printer) WriteType

func (p *Printer) WriteType(n semantic.Type) *Printer

WriteType appends the string representation of n to the Printer's buffer.

Jump to

Keyboard shortcuts

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