Commit Graph

28 Commits

Author SHA1 Message Date
Sebastian Schmidt
d77fa15864 Use EvalexprResult<T> everywhere
Relates to #31
2019-03-27 19:09:58 +01:00
Sebastian Schmidt
7d0abc8406 Rename as_float to as_number and add strict as_float
Relates to #20
2019-03-27 18:49:02 +01:00
Sebastian Schmidt
b18521b8aa Format code 2019-03-27 18:35:16 +01:00
Sebastian Schmidt
9283d5412f Rename Context to ContextMut and Configuration to Context
Get rid of two different words for the same concept.

Relates to #22
2019-03-27 18:09:33 +01:00
Sebastian Schmidt
3da6019dae Add Context trait
* Rename `HashMapConfiguration` to `HashMapContext`
 * Rename `EmptyConfiguration` to `EmptyContext`
 * Implement `Context` for both predefined contexts
 * Update tests and doctests

Relates to #22
2019-03-27 17:45:06 +01:00
Sebastian Schmidt
fd879193b6 Rename Error to EvalexprError and add EvalexprResult
Relates to #27
2019-03-27 16:33:46 +01:00
Sebastian Schmidt
8a49bf9c11 Get rid of some unwraps
Relates to #14
2019-03-27 16:16:40 +01:00
Sebastian Schmidt
6f17e481aa Ensure no-panic for operators
Partially implements #11
2019-03-20 12:52:11 +02:00
Sebastian Schmidt
92da684c69 Implement min and max builtin functions
Implement #8, partially implement #1
2019-03-19 20:08:23 +02:00
Sebastian Schmidt
55e8b51228 Add exponentiation operator
+ Add hat token
 + Add exponentiation operator
 + Document exponentiation operator
 + Test exponentiation operator

Implements #3
2019-03-19 18:42:50 +02:00
Sebastian Schmidt
c631171ff0 Add comma operator and display implementations
+ Add comma token
 + Add tuple operator
 + Add tuple value type
 + Implement display for `tree::Node` and all related types
 + Add support for right-to-left chaining of operators with same precedence

The priority of chaining of operators with the same precedence remains left-to-right.
Only if two consecutive operators with the same precedence are right-to-left, they will be ordered right-to-left.

Implements #4.
2019-03-19 18:24:36 +02:00
Sebastian Schmidt
879f1fcd22 Evaluate arbitrary functions 2019-03-18 19:22:44 +02:00
Sebastian Schmidt
22d0d2c3d0 Format code and specify exports 2019-03-18 18:02:45 +02:00
Sebastian Schmidt
b3a616c39a Working on implementing functions 2019-03-15 20:26:25 +02:00
Sebastian Schmidt
3351d19db3 Tested configuration 2019-03-15 19:46:00 +02:00
Sebastian Schmidt
b1abbd6cfd Implemented configuration 2019-03-15 19:29:36 +02:00
Sebastian Schmidt
406bfe0e05 rustfmt 2019-03-15 19:22:14 +02:00
Sebastian Schmidt
bb74bee382 Implemented boolean expressions 2019-03-15 19:19:59 +02:00
Sebastian Schmidt
a1ba054609 Implemented mod and replaced Braced with RootNode 2019-03-15 18:34:40 +02:00
Sebastian Schmidt
1bc2909c1b Implemented and tested braces 2019-03-15 18:27:10 +02:00
Sebastian Schmidt
0ee4946eaf Implemented separate int and float types 2019-03-15 17:40:38 +02:00
Sebastian Schmidt
3975a17f0b Fixed warnings and removed unused dependencies. 2019-03-15 17:21:34 +02:00
Sebastian Schmidt
b38c102c1d Complete rewrite of crate. Simple tokenizer and treeifyer (Or however the compiler people call these.). 2019-03-15 17:14:27 +02:00
Sebastian Schmidt
c313ec8ce5 Deciding to try a reboot 2019-03-15 13:42:18 +02:00
fengcen
ce671d0f0a update serde to version 0.9, bump version 0.4.0 2017-02-13 08:26:47 +08:00
fengcen
3cb3197f6f add . and [] support. 2016-11-21 09:14:40 +08:00
fengcen
3c19414593 format code. 2016-11-17 23:53:17 +08:00
fengcen
1d84eea270 init repository. 2016-11-17 00:12:26 +08:00