Documentation
¶
Index ¶
- func EvalBooleanExpr(expr string, res *types.DocumentResult) bool
- func EvalComparison(expr string, res *types.DocumentResult) bool
- func EvalNumericExpr(expr string, lookup func(id string) (float64, bool)) (float64, bool)
- func LookupGlobal(res *types.DocumentResult, id string) (float64, bool)
- func NormalizeNumber(v any) (any, bool)
- func ParseNumber(s string) (float64, bool)
- type Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalBooleanExpr ¶
func EvalBooleanExpr(expr string, res *types.DocumentResult) bool
func EvalComparison ¶
func EvalComparison(expr string, res *types.DocumentResult) bool
func EvalNumericExpr ¶
表达式求值(数字)支持 + - * / 和括号,以及函数 abs(x), approx(a,b,tol)->0/1, between(x,a,b)->0/1
func LookupGlobal ¶
func LookupGlobal(res *types.DocumentResult, id string) (float64, bool)
LookupGlobal 解析 id 形如 chapter.field 或 globals.key,返回数值
func NormalizeNumber ¶
func ParseNumber ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.