Commit Graph

19 Commits

Author SHA1 Message Date
Sebastian Schmidt
88ab1e1987 Add Value::Empty and ValueType::Empty
Relates to #28
2019-03-28 09:56:44 +01:00
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
7decb7c895 Make ValueType public 2019-03-27 17:55:05 +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
d3deef1f53 Provide more methods for value conversions
+ Provide is_[type] for each value type
 + Provide as_[type] for each value type

Related to #16
2019-03-20 17:30:14 +02:00
Sebastian Schmidt
e337520805 Introduce TupleType type alias for representing tuples 2019-03-20 16:40:57 +02:00
Sebastian Schmidt
5549f1bba5 Make internal value type aliases for float and int public 2019-03-20 16:18:52 +02:00
Sebastian Schmidt
1ae674a693 Replace TypeError with more detailed errors
Implements #9
2019-03-20 11:42:17 +02:00
Sebastian Schmidt
cdcd24e7b6 Document value type
Implements #6 partially
2019-03-19 20:31:03 +02:00
Sebastian Schmidt
bcfce4aaec Add trailing commas to match arm blocks 2019-03-19 19:06:37 +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
2b9d50909e Add quickstart guide and detailed explanation of features 2019-03-19 12:01:06 +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
b38c102c1d Complete rewrite of crate. Simple tokenizer and treeifyer (Or however the compiler people call these.). 2019-03-15 17:14:27 +02:00