eval

package
v0.0.0-...-e0f2298 Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

类型定义 author: baoqiang time: 2019/3/19 下午8:15

check的方法实现 author: baoqiang time: 2019/3/19 下午8:16

eval的方法实现 author: baoqiang time: 2019/3/19 下午8:12

解析器 TODO 读懂 author: baoqiang time: 2019/3/19 下午8:25

打印 author: baoqiang time: 2019/3/19 下午8:25

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(e Expr) string

Types

type Env

type Env map[Var]float64

type Expr

type Expr interface {
	Eval(env Env) float64
	Check(vars map[Var]bool) error
}

func Parse

func Parse(input string) (_ Expr, err error)

type Var

type Var string

func (Var) Check

func (v Var) Check(vars map[Var]bool) error

func (Var) Eval

func (v Var) Eval(env Env) float64

Jump to

Keyboard shortcuts

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