pp

package
v0.0.0-...-4e49b15 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package pp implements Scheme pretty-printing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTML

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

HTML implements HTML pretty-printing.

func NewHTML

func NewHTML(w io.Writer, name string) *HTML

NewHTML creates a new HTML pretty-print writer.

func (*HTML) Debug

func (w *HTML) Debug()

Debug implements Writer.Debug.

func (*HTML) Error

func (w *HTML) Error() error

Error implements Writer.Error.

func (*HTML) Header

func (w *HTML) Header()

Header implements Writer.Header.

func (*HTML) Keyword

func (w *HTML) Keyword(keyword string)

Keyword implements Writer.Keyword.

func (*HTML) Literal

func (w *HTML) Literal(lit string)

Literal implements Writer.Literal.

func (*HTML) Name

func (w *HTML) Name(name string)

Name implements Writer.Name.

func (*HTML) Pop

func (w *HTML) Pop()

Pop implements Writer.Pop.

func (*HTML) Printf

func (w *HTML) Printf(format string, a ...any)

Printf implements Writer.Printf.

func (*HTML) Println

func (w *HTML) Println(a ...any)

Println implements Writer.Println.

func (*HTML) Push

func (w *HTML) Push()

Push implements Writer.Push.

func (*HTML) PushN

func (w *HTML) PushN(n int)

PushN implements Writer.PushN.

func (*HTML) Trailer

func (w *HTML) Trailer()

Trailer implements Writer.Trailer.

func (*HTML) Type

func (w *HTML) Type(t string)

Type implements Writer.Type.

type Writer

type Writer interface {
	// Debug prints debugging information about the Writer.
	Debug()

	// Header creates the output header. This is called at the
	// beginning of the pretty-print.
	Header()

	// Trailer creates the output trailer. This is called at the end
	// of the pretty-print.
	Trailer()

	// Push pushes the current column as new left margin.
	Push()

	// Pop removes the current left margin and sets the previous left
	// margin as the current one.
	Pop()

	// PushN adjust the left margin with n columns.
	PushN(n int)

	// Println formats using the default formats for its operands and
	// outputs the result. Spaces are always added between operands
	// and a newline is appended.
	Println(a ...any)

	// Printf prints a formatted message.
	Printf(format string, a ...any)

	// Keyword prints a Scheme keyword.
	Keyword(keyword string)

	// Name prints a Scheme name.
	Name(name string)

	// Type prints a type.
	Type(t string)

	// Literal prints a string literal.
	Literal(t string)

	// Error returns an error if any of the methods failed during the
	// pretty-printing.
	Error() error
}

Writer implements Scheme pretty-printer.

Jump to

Keyboard shortcuts

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