Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryOpNode ¶
BinaryOpNode 二元运算符节点
func (*BinaryOpNode) Eval ¶
func (n *BinaryOpNode) Eval(ctx context.Context, vars map[string]decimal.Decimal, config *math_config.CalcConfig) (decimal.Decimal, error)
Eval 实现 BinaryOpNode 的 Eval 方法
type FunctionNode ¶
FunctionNode 函数节点
func (*FunctionNode) Eval ¶
func (n *FunctionNode) Eval(ctx context.Context, vars map[string]decimal.Decimal, config *math_config.CalcConfig) (decimal.Decimal, error)
Eval 实现 FunctionNode 的 Eval 方法
type Node ¶
type Node interface {
Eval(ctx context.Context, vars map[string]decimal.Decimal, config *math_config.CalcConfig) (decimal.Decimal, error)
}
Node 表达式节点接口
type NumberNode ¶
NumberNode 数字节点
func (*NumberNode) Eval ¶
func (n *NumberNode) Eval(ctx context.Context, vars map[string]decimal.Decimal, config *math_config.CalcConfig) (decimal.Decimal, error)
Eval 实现 NumberNode 的 Eval 方法
type UnaryOpNode ¶
UnaryOpNode 一元运算符节点
func (*UnaryOpNode) Eval ¶
func (n *UnaryOpNode) Eval(ctx context.Context, vars map[string]decimal.Decimal, config *math_config.CalcConfig) (decimal.Decimal, error)
Eval 实现 UnaryOpNode 的 Eval 方法
type VariableNode ¶
VariableNode 变量节点
func (*VariableNode) Eval ¶
func (n *VariableNode) Eval(ctx context.Context, vars map[string]decimal.Decimal, config *math_config.CalcConfig) (decimal.Decimal, error)
Eval 实现 VariableNode 的 Eval 方法
Click to show internal directories.
Click to hide internal directories.