Commit Graph

62 Commits

Author SHA1 Message Date
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
7decb7c895 Make ValueType public 2019-03-27 17:55:05 +01:00
Sebastian Schmidt
44041b03db Make TupleType alias public 2019-03-27 17:53:48 +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
49da58976e Improve serde readme
Relates to #18
2019-03-23 15:39:19 +02:00
Sebastian Schmidt
a7ca4c717d Implement, test and document serde Deserialize for expressions
Relates to #18
2019-03-23 15:20:43 +02:00
Sebastian Schmidt
3d440524a5 Fix checking for serde feature flag in code
Relates to #18
2019-03-23 14:29:53 +02:00
Sebastian Schmidt
5e491f6771 Add serde feature
Relates to #18
2019-03-23 12:46:52 +02:00
Sebastian Schmidt
3a816fa7e7 Add highlighting to readme 2019-03-21 09:40:50 +02:00
Sebastian Schmidt
1375134e9f Document operations on values
Relates to #16
2019-03-20 17:30:37 +02:00
Sebastian Schmidt
d4359d71bf Document the shortcut functions for direct evaluation into types
Related to #15
2019-03-20 17:06:47 +02:00
Sebastian Schmidt
36a65c470b Refactor lib.rs
* Move tests into integration test folder
 * Move crate methods into interface module
2019-03-20 15:48:05 +02:00
Sebastian Schmidt
4177ae7e77 Prepare 1.0.0 release 2019-03-20 15:04:59 +02:00
Sebastian Schmidt
6f17e481aa Ensure no-panic for operators
Partially implements #11
2019-03-20 12:52:11 +02:00
Sebastian Schmidt
58e8603194 Rename Node::eval to Node::eval_with_configuration for consistency.
* Rename `Node::eval` to `Node::eval_with_configuration`
 + Add `Node::eval` that calls `Node::eval_with_configuration` with an `EmptyConfiguration`
 + Improve documentation of `Node` and the changed methods

Implements #5
2019-03-20 11:58:08 +02:00
Sebastian Schmidt
6fe5a8cdef Document toplevel functions
Implements #6
2019-03-19 20:24:11 +02:00
Sebastian Schmidt
4a32062089 Warn for missing docs 2019-03-19 20:13:04 +02:00
Sebastian Schmidt
827c7440be Format code and sync readme 2019-03-19 20:12:30 +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
f0ab317961 Test functions with arbitrary argument amount
Implements #7
2019-03-19 19:05:21 +02:00
Sebastian Schmidt
fd3243e555 Implement functions with arbitrary argument amount
Implements #7
2019-03-19 18:58:53 +02:00
Sebastian Schmidt
8e898044c0 Document the aggregation operator
Documents #4
2019-03-19 18:49:59 +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
93e8d867b4 Add exponentation operator
+ Add hat token
 + Add exponentation operator

Implements #3
2019-03-19 18:32:10 +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
265b1214b0 Improve documentation about precedence and operators and README introduction 2019-03-19 16:47:17 +02:00
Sebastian Schmidt
c58d5dcda5 Test if functions can actually be called with multiple arguments 2019-03-19 12:47:01 +02:00
Sebastian Schmidt
ed73f779e9 Add explanation about functions and precedences 2019-03-19 12:22:06 +02:00
Sebastian Schmidt
2b9d50909e Add quickstart guide and detailed explanation of features 2019-03-19 12:01:06 +02:00
Sebastian Schmidt
a51680da08 Add precedences to operators in docs 2019-03-19 11:03:34 +02:00
Sebastian Schmidt
33d26aceb0 Check how github renders readme 2019-03-19 10:43:52 +02:00
Sebastian Schmidt
79d8084baa Add proper documentation 2019-03-18 19:51:20 +02:00
Sebastian Schmidt
d2336cb59d Implement function to build operator tree 2019-03-18 19:25:43 +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
879fc4fe3d Tested separate int and float types 2019-03-15 17:43:26 +02:00
Sebastian Schmidt
0ee4946eaf Implemented separate int and float types 2019-03-15 17:40:38 +02:00
Sebastian Schmidt
22490f5036 Tested arithmetic precedence 2019-03-15 17:24:45 +02:00
Sebastian Schmidt
045313f076 More test cases 2019-03-15 17:18:20 +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