Sebastian Schmidt
d5544cdbf2
Add eval_number[_with_context] crate methods
...
Relates to #20
2019-03-27 18:59:06 +01:00
Sebastian Schmidt
720b2f90c2
Add Node::eval_number[_with_context] methods
...
Relates to #20
2019-03-27 18:55:51 +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
24ca11e52a
Document how to enable serde feature flag
...
Relates to #21
2019-03-27 18:35:00 +01:00
Sebastian Schmidt
1574514220
Add forgotten changes to change log
2019-03-27 18:19:05 +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
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
b65127c2cb
Add Context
trait
...
* Rename `HashMapConfiguration` to `HashMapContext`
* Rename `EmptyConfiguration` to `EmptyContext`
* Implement `Context` for both predefined contexts
* Add the `ContextNotManipulable` error variant
* Add function `EvalexprError::expected_type` to emit a specific type error when a type is expected dynamically within a context
* Update tests and doctests
* Add ValueType enum to aid dynamic typing
Relates to #22
2019-03-27 17:53:01 +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
d64aacea17
Update changelog
2019-03-27 16:19:56 +01:00
Sebastian Schmidt
c4917f2b67
Update readme
2019-03-27 16:16:59 +01:00
Sebastian Schmidt
8a49bf9c11
Get rid of some unwraps
...
Relates to #14
2019-03-27 16:16:40 +01:00
Sebastian Schmidt
a33c91813b
Prepare changelog for next development iteration
2019-03-23 16:17:09 +02:00
Sebastian Schmidt
232838b032
(cargo-release) start next development iteration 1.2.0
2019-03-23 16:16:03 +02:00
Sebastian Schmidt
bc2c60b7bb
(cargo-release) version 1.2.0
2019-03-23 16:15:53 +02:00
Sebastian Schmidt
6e5d8e6d75
Prepare change log for release
2019-03-23 16:15:48 +02:00
Sebastian Schmidt
49da58976e
Improve serde readme
...
Relates to #18
2019-03-23 15:39:19 +02:00
Sebastian Schmidt
0a9b4d5f3a
(cargo-release) version 1.2.0-rc.1
2019-03-23 15:38:07 +02:00
Sebastian Schmidt
8bb941cff7
Set version to target of next release
2019-03-23 15:37:33 +02:00
Sebastian Schmidt
b302ad112d
Format code
2019-03-23 15:34:24 +02:00
Sebastian Schmidt
5ad335937d
Add lib doc changes to readme
...
Relates to #18
2019-03-23 15:34:05 +02:00
Sebastian Schmidt
1a733ccf63
Log addition of custom error type in change log
2019-03-23 15:30:54 +02:00
Sebastian Schmidt
cba49f7bba
Rename Error::Custom to Error::CustomMessage
2019-03-23 15:30:34 +02:00
Sebastian Schmidt
16a79cd567
Remove serde: 🇩🇪 :Error implementation for error::Error
...
Serde forces us to be generic over which error our visitor returns, so we cannot return our error type.
So the implementation of serde's error trait is useless to us at this state.
Relates to #18
2019-03-23 15:27:18 +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
a4d1a34a0c
Implement Display and std::error::Error for Error
...
Relates to #19
2019-03-23 14:27:44 +02:00
Sebastian Schmidt
16bde54aa5
Implement display for Token and PartialToken
...
Relates to #19
2019-03-23 14:22:50 +02:00
Sebastian Schmidt
5e491f6771
Add serde feature
...
Relates to #18
2019-03-23 12:46:52 +02:00
Sebastian Schmidt
348578ca9f
Add missing unreleased section header to changelog
2019-03-21 12:45:58 +02:00
Sebastian Schmidt
3a816fa7e7
Add highlighting to readme
2019-03-21 09:40:50 +02:00
Sebastian Schmidt
c4cf033b1f
(cargo-release) start next development iteration 1.1.0
2019-03-20 17:43:25 +02:00
Sebastian Schmidt
30e9cb54e2
(cargo-release) version 1.1.0
2019-03-20 17:43:14 +02:00
Sebastian Schmidt
ef24c068fd
Prepare changelog for release
2019-03-20 17:43:06 +02:00
Sebastian Schmidt
1badd5cf52
(cargo-release) version 1.1.0-rc.1
2019-03-20 17:33:03 +02:00
Sebastian Schmidt
5b7ba2345a
Change version number to make cargo-release work
2019-03-20 17:32:40 +02:00
Sebastian Schmidt
1375134e9f
Document operations on values
...
Relates to #16
2019-03-20 17:30:37 +02: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
e4f12da24e
Organize change log and complete it for #15
2019-03-20 17:09:16 +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
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
e337520805
Introduce TupleType type alias for representing tuples
2019-03-20 16:40:57 +02:00
Sebastian Schmidt
98ca788910
Reword documentation of shortcut methods to be more direct
...
Changed `expecting a type` to `into a type` to be more clear that the function actually returns a result of the respecting type.
Related to #15
2019-03-20 16:34:23 +02:00
Sebastian Schmidt
2dac0576a7
Add shortcut functions for evaluating directly into a value type
...
+ Added shortcut functions `eval_[type]` and `eval_[type]_with_configuration` for each value type
+ Added integration tests for the above
Partially implements #15
2019-03-20 16:29:50 +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
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
3bcb9b2770
Add initial change log
2019-03-20 15:37:07 +02:00