# XCover expression language


A simple language that supports dynamic pricing strategy.

It lets pricing experts to dynamically modify the pricing without having to update code

Note: This is not Python.

## Features

* Variables
* Variable assignments
* *Arithmetic operations + - * / and ()
* dictionaries, lookup
* or operation
* functions with parameters (only min and max function is  implemented
* `in` membership testing
* `and` and `or` logical operators
* Equalities and Inequalities test (`==`, `<>`, `>`, `>=`, `<`, `<=`)
* `if-then-else` support (`if_cond(expression, TRUE, FALSE)`)`

## How to use

Refer to unit tests for now, as it is under active development

Quick example

```
from xcover_lang.utils import eval_expr

>>> eval_expr('1+1')
(2.0, {})

```



## Roadmap

Pull requests are wellcome :)

* ~~Support negative numbers~~
* ~~Support nested parenthese~~
* ~~Add `minus, `divide` support~~
* ~~add equalities and inequalities support, (`==`, `<>`, `>`, `>=`, `<`, `<=`)~~
* ~~add `if-then-else` support~~
* Write end user documentation
* add more logical operator support
* Proper support for data structures, `int`, `float', and `list`
* support code blocks
* add `log`, `sqrt`, `pow` support

