expr icon indicating copy to clipboard operation
expr copied to clipboard

Expression language and expression evaluation for Go

Results 146 expr issues
Sort by recently updated
recently updated
newest added

https://github.com/antonmedv/expr/pull/173#issuecomment-985388643 fix for that just change scope for nilsafe variable :) also seems IdentifierNode shouldn't have NilSafe option

Fix chaining issue for #173

code:= `1+1/(4+5)*(1*5)+3.3+3.3+3.3+3.3/3.3*3.3` When I run this code in excel, I get 14.7555. When I run it in expr, I get 14.2. What accounts for the difference? however this works: `1.0+1/(4.0+5)*(1*5.0)+3.3+3.3+3.3+3.3/3.3*3.3`...

I have a usecase where I want to distinguish 0 and nil so I'm trying to pass `*int` to expr. Below is code I tried and it doesn't work as...

bug

``` val := `1 & 1` complie, err := expr.Compile(val) r, err := expr.Run(complie,env) if err!=nil { fmt.Printf("%+v", err) } if v, ok := r.(int); ok { fmt.Printf("%+v", v) }...

We want to be able to sandbox expression evaluation, because some users might submit time, memory, or CPU intensive expression, either accidentally, or as a intentional attack of code that...

Is there a way to timeout and kill a running expr.Run/VM.Run process if it is taking too long? This is to terminate/interupt runaway code that was miscoded,etc. I did a...

e.g. `5 min ago` in expr, or `2 days long`.

How exactly should this be implemented: To fetch fields from struct, values from map, get by indexes expr uses reflect package. Envs can implement vm.Fetcher interface, to avoid use reflect:...

In a nutshell, compare between `string` and `type Other string` will cause error like `interface conversion: interface {} is main.Status, not string`. Any elegant way to result this issue? Type...