-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
alias.go
32 lines (25 loc) · 876 Bytes
/
alias.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package runn
import (
"github.com/k1LoW/runn/internal/expr"
"github.com/k1LoW/runn/internal/exprtrace"
)
func EvalWithTrace(e string, store exprtrace.EvalEnv) (*exprtrace.EvalResult, error) {
return expr.EvalWithTrace(e, store)
}
func Eval(e string, store exprtrace.EvalEnv) (any, error) {
return expr.Eval(e, store)
}
// EvalAny evaluate any type. but, EvalAny do not evaluate map key.
func EvalAny(e any, store exprtrace.EvalEnv) (any, error) {
return expr.EvalAny(e, store)
}
func EvalCond(cond string, store exprtrace.EvalEnv) (bool, error) {
return expr.EvalCond(cond, store)
}
func EvalCount(count string, store exprtrace.EvalEnv) (int, error) {
return expr.EvalCount(count, store)
}
// EvalExpand evaluates `in` and expand `{{ }}` in `in` using `store`.
func EvalExpand(in any, store exprtrace.EvalEnv) (any, error) {
return expr.EvalExpand(in, store)
}