ast

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsFloat32

func AbsFloat32(a float32) float32

func AbsFloat64

func AbsFloat64(a float64) float64

func Evaluate

func Evaluate(node *AST, env *Env) interface{}

func MaxFloat32

func MaxFloat32(a, b float32) float32

func MaxFloat64

func MaxFloat64(a, b float64) float64

func MinFloat32

func MinFloat32(a, b float32) float32

func MinFloat64

func MinFloat64(a, b float64) float64

func PrettyPrint

func PrettyPrint(w io.Writer, node *AST, indent string)

Types

type AST

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

func ParseExpr

func ParseExpr(expression string) (*AST, error)

type Args

type Args [][]float64

type Env

type Env map[string]interface{}

func NewEnv

func NewEnv() *Env

func (*Env) Set

func (e *Env) Set(key string, value interface{})

type ParseError

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

func (*ParseError) Error

func (e *ParseError) Error() string

type Token

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

Jump to

Keyboard shortcuts

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