format

package
v0.380.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(ast *parser.AST) string

func HasComments

func HasComments(nodes []node.ParserNode) bool

Types

type Writer

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

func (*Writer) Block

func (w *Writer) Block(fn func())

func (*Writer) Comments

func (w *Writer) Comments(node node.ParserNode, fn func())

func (*Writer) Dedent

func (w *Writer) Dedent()

func (*Writer) Indent

func (w *Writer) Indent()

func (*Writer) LineLength

func (w *Writer) LineLength() int

func (*Writer) String

func (w *Writer) String() string

func (*Writer) Write

func (w *Writer) Write(s string, args ...any)

func (*Writer) WriteLine

func (w *Writer) WriteLine(s string, args ...any)

Jump to

Keyboard shortcuts

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