Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultMemoryBudget represents default maximum allowed memory usage by the vm.VM. DefaultMemoryBudget uint = 1e6 // DefaultMaxNodes represents default maximum allowed AST nodes by the compiler. DefaultMaxNodes uint = 1e4 )
Functions ¶
func EnvWithCache ¶ added in v1.17.7
func EnvWithCache(c *Cache, env any) Nature
Types ¶
type Config ¶
type Config struct {
EnvObject any
Env nature.Nature
Expect reflect.Kind
ExpectAny bool
Optimize bool
Strict bool
ShortCircuit bool
Profile bool
MaxNodes uint
ConstFns map[string]reflect.Value
Visitors []ast.Visitor
Functions FunctionsTable
Builtins FunctionsTable
Disabled map[string]bool // disabled builtins
NtCache nature.Cache
// DisableIfOperator disables the built-in `if ... { } else { }` operator syntax
// so that users can use a custom function named `if(...)` without conflicts.
// When enabled, the lexer treats `if`/`else` as identifiers and the parser
// will not parse `if` statements.
DisableIfOperator bool
}
func (*Config) IsOverridden ¶ added in v1.16.0
type FunctionsTable ¶ added in v1.16.1
Click to show internal directories.
Click to hide internal directories.