Commit Graph

19 Commits

Author SHA1 Message Date
Sebastian Schmidt
c980e49014 Add shortcut functions to evaluate Node into value types
+ Add functions `Node::eval_[type]` and `Node::eval_[type]_with_configuration` to evaluate a node directly into a value type

Partially implements #15
2019-03-20 16:57:21 +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
e387d3370b Fix a typo 2019-03-20 11:50:09 +02:00
Sebastian Schmidt
38c4c35a0b Document all remaining public members
Implements #6
2019-03-20 11:32:55 +02:00
Sebastian Schmidt
bcfce4aaec Add trailing commas to match arm blocks 2019-03-19 19:06:37 +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
879f1fcd22 Evaluate arbitrary functions 2019-03-18 19:22:44 +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
fengcen
0c4413836d fix #2 2018-08-24 09:09:55 +08: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
032e57df43 add Expr builder. add ExecOptions. add len() 2016-11-20 16:04:06 +08:00