2022-07-01 02:21:51 +03:00
|
|
|
# expression
|
|
|
|
|
|
|
|
Another expression parser and executor
|
|
|
|
Better version of https://github.com/neonxp/lexpr
|
|
|
|
|
|
|
|
## usage
|
|
|
|
|
|
|
|
```go
|
2024-04-28 00:20:24 +03:00
|
|
|
import "go.neonxp.ru/expression"
|
2022-07-01 02:21:51 +03:00
|
|
|
...
|
|
|
|
e := expression.New()
|
|
|
|
result, err := e.Eval(`2 + 2`) // 4, nil
|
|
|
|
...
|
|
|
|
```
|
|
|
|
|
|
|
|
## defaults
|
|
|
|
|
|
|
|
Default operators and functions: [/defaults.go](/defaults.go)
|