debug

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: Apache-2.0 Imports: 5 Imported by: 6

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 *exprpb.Expr, adorner Adorner) string

ToAdornedDebugString gives the adorned string representation of the Expr.

func ToDebugString

func ToDebugString(e *exprpb.Expr) string

ToDebugString gives the unadorned string representation of the Expr.

Types

type Adorner

type Adorner interface {
	// GetMetadata for the input context.
	GetMetadata(ctx interface{}) 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 *exprpb.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