debug

package
v0.27.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0, BSD-3-Clause Imports: 7 Imported by: 1 module, 0 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 debug provides tools to print a parsed expression graph and adorn each expression element with additional metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToAdornedDebugString

func ToAdornedDebugString(e ast.Expr, adorner Adorner) string

ToAdornedDebugString gives the adorned string representation of the Expr.

func ToDebugString

func ToDebugString(e ast.Expr) string

ToDebugString gives the unadorned string representation of the Expr.

func ToDebugStringWithIDs added in v0.27.0

func ToDebugStringWithIDs(e ast.Expr) string

ToDebugStringWithIDs returns a string representation with AST node IDs.

Types

type Adorner

type Adorner interface {
	// GetMetadata for the input context.
	GetMetadata(ctx any) string
}

Adorner returns debug metadata that will be tacked on to the string representation of an expression.

type Writer

type Writer interface {
	fmt.Stringer

	// Buffer pushes an expression into an internal queue of expressions to
	// write to a string.
	Buffer(e ast.Expr)
}

Writer manages writing expressions to an internal string.

Jump to

Keyboard shortcuts

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