| 21 | type FunctionsTable map[string]*builtin.Function |
| 22 | |
| 23 | type 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. |
| 47 | func CreateNew() *Config { |
nothing calls this directly
no outgoing calls
no test coverage detected