Versions in this module Expand all Collapse all v1 v1.0.0 Sep 7, 2022 Changes in this version + const AngleMode + const COMMA + const Identifier + const Literal + const Operator + const RadianMode + var TrigonometricMode = RadianMode + func ErrPos(s string, pos int) string + func ExprASTResult(expr ExprAST) float64 + func Float64ToStr(f float64) string + func ParseAndExec(s string) (r float64, err error) + func Pow(x float64, n float64) float64 + func RegFunction(name string, argc int, fun func(...ExprAST) float64) error + type AST struct + Err error + Tokens []*Token + func NewAST(toks []*Token, s string) *AST + func (a *AST) ParseExpression() ExprAST + type BinaryExprAST struct + Lhs ExprAST + Op string + Rhs ExprAST + type ExprAST interface + type FunCallerExprAST struct + Arg []ExprAST + Name string + type NumberExprAST struct + Str string + Val float64 + type Parser struct + Source string + type Token struct + Flag int + Offset int + Tok string + Type int + func Parse(s string) ([]*Token, error)