pry

package
v0.0.0-...-d72db1d Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2015 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(arr, elem interface{}) (interface{}, error)

A runtime replacement for the append function

func Apply

func Apply(v Scope)

func ComputeBinaryOp

func ComputeBinaryOp(xI, yI interface{}, op token.Token) (interface{}, error)

func ComputeUnaryOp

func ComputeUnaryOp(xI interface{}, op token.Token) (interface{}, error)

func Highlight

func Highlight(s string) string

func HighlightWords

func HighlightWords(s string, words []string, color, edges string) string

func InterpretExpr

func InterpretExpr(scope Scope, expr ast.Expr) (interface{}, error)

Interprets an ast.Expr and returns the value.

func InterpretString

func InterpretString(scope Scope, exprStr string) (interface{}, error)

Interprets a string of go code and returns the result.

func Make

func Make(t interface{}, args ...interface{}) (interface{}, error)

A runtime replacement for the make function

func Pry

func Pry(v ...interface{})

func StringToType

func StringToType(str string) (reflect.Type, error)

Returns the reflect.Type corresponding to the type string provided. Ex: StringToType("int")

func ValuesToInterfaces

func ValuesToInterfaces(vals []reflect.Value) []interface{}

Converts a slice of []reflect.Value to []interface{}

Types

type Package

type Package struct {
	Name      string
	Functions map[string]interface{}
}

func (*Package) Process

func (p *Package) Process()

type Scope

type Scope map[string]interface{}

Jump to

Keyboard shortcuts

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