MCPcopy
hub / github.com/expr-lang/expr / Config

Struct Config

conf/config.go:23–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21type FunctionsTable map[string]*builtin.Function
22
23type Config struct {
24 EnvObject any
25 Env nature.Nature
26 Expect reflect.Kind
27 ExpectAny bool
28 Optimize bool
29 Strict bool
30 ShortCircuit bool
31 Profile bool
32 MaxNodes uint
33 ConstFns map[string]reflect.Value
34 Visitors []ast.Visitor
35 Functions FunctionsTable
36 Builtins FunctionsTable
37 Disabled map[string]bool // disabled builtins
38 NtCache nature.Cache
39 // DisableIfOperator disables the built-in `if ... { } else { }` operator syntax
40 // so that users can use a custom function named `if(...)` without conflicts.
41 // When enabled, the lexer treats `if`/`else` as identifiers and the parser
42 // will not parse `if` statements.
43 DisableIfOperator bool
44}
45
46// CreateNew creates new config with default values.
47func CreateNew() *Config {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected