Kaspar Schleiser
8b08d2081b
add simple cli binary
2023-06-01 15:35:11 +03:00
Sebastian Schmidt
db95723f8e
Fix implementation order.
2023-05-27 12:21:45 +03:00
Sebastian Schmidt
199a42ebab
Fixes for pull request #130 .
2023-05-27 11:04:56 +03:00
ISibboI
e63a99af80
Merge branch 'main' into main
2023-05-27 10:42:40 +03:00
Sebastian Schmidt
c01a23bcf8
Return Ok
when disabling builtin functions in EmptyContext
and enabling builtin functions in EmptyContextWithBuiltinFunctions
.
...
These are noops anyways.
2023-05-21 10:30:53 +03:00
Sebastian Schmidt
5a4dcf9516
Fix docs and error types.
2023-05-21 10:30:53 +03:00
Codex Yore
24c1749143
Resolving issues for PR #129
2023-05-21 10:30:53 +03:00
Codex Yore
50532c5db5
feature_method_to_disable_builtin_function
2023-05-21 10:30:53 +03:00
LinuxHeki
d9698df268
math::abs of int returns int
2023-05-21 09:12:12 +02:00
LinuxHeki
1fc137a233
add math::abs to docs
2023-05-20 15:34:46 +02:00
Heki
bf716b2e87
add math::abs function
2023-05-20 13:16:24 +00:00
Sebastian Schmidt
ed6430abed
Fix new nightly warning.
2023-05-16 18:11:24 +03:00
Sebastian Schmidt
0a46a244e0
Make docs more uniform.
2023-05-16 17:55:24 +03:00
Nick
d427405f47
contains and contians any - remove comment
2023-05-10 12:37:43 -05:00
Nick
8b8af31eb8
contains + contains_any builtins
2023-05-10 12:31:33 -05:00
Nick
76d480c465
Some
function to check if tuple contains value
2023-05-08 08:36:13 -05:00
Sebastian Schmidt
ab24e08f28
Remove superfluous printlns.
2023-04-13 14:44:47 +03:00
Sebastian Schmidt
4fd86751dc
Fix unary operator precedence.
...
Before, unary operators that appeared after an operator with higher precedence would be executed after that operator.
However, in evalexpr, the two unary operators are prefix operators negation and not, and prefix operators always happen before operators directly left of them.
2023-04-13 14:42:39 +03:00
Claus Matzinger
f5520077e0
Added Clone to errors
2022-12-01 23:20:08 +01:00
Natan Freeman
927e0e4075
Replaces f64
and i64
with FloatType
and IntType
.
2022-09-14 21:36:36 +03:00
Tobias Schmitt
165c606ed4
typo in doctest
2022-07-21 21:16:09 +02:00
Tobias Schmitt
532e2ed770
adds iter_(read/write)_variable_identifiers
...
seperate iterator returns for read and write variable identifiers.
this is useful in our project and i suspect it might be of use for
others too.
2022-07-21 21:12:26 +02:00
Sebastian Schmidt
4cc86e7683
Add trait to allow iterating over all variables in a context.
...
Both iterating with and without values is supported.
Due to limitations in the language, currently only iterating by cloning is supported. When GATs are stabilised, this should change.
Relates to #108
2022-07-15 13:44:31 +03:00
Sebastian Schmidt
3d60c66305
Replace version specification in README with "desired version".
2022-07-15 13:16:24 +03:00
Sebastian Schmidt
e70e9d366a
Use explicit operator type for reading and writing variables.
...
Before, variables written to were represented with the same operator as constants in the AST. This was hacky and confusing to some users.
Closes #106
2022-07-04 17:10:28 +03:00
Sebastian Schmidt
54c4286672
Use double dot syntax in operator/mod.rs
.
2022-07-04 17:03:32 +03:00
Sebastian Schmidt
65fadfd164
Add tests for left-hand side of assignment being an identifier.
...
Relates to #106
2022-07-04 16:50:50 +03:00
Sebastian Schmidt
563d82a525
Fix unnecessary unused lints.
2022-07-04 14:51:27 +03:00
Sebastian Schmidt
5f1aa344ab
Fix unnecessary format lints.
2022-07-04 14:44:34 +03:00
Sebastian Schmidt
4927de7ac6
Implement TryFrom<Value>
for all types a value can store.
2022-07-04 14:37:48 +03:00
ISibboI
687f762115
Merge branch 'main' into random
2022-04-07 16:20:41 +03:00
Ophir LOJKINE
27bd1a32d7
add comment
...
Fixes https://github.com/ISibboI/evalexpr/pull/101#discussion_r838444554
2022-03-30 14:44:19 +02:00
Ophir LOJKINE
bce31e24ae
new function: random()
...
random() returns a random number between 0 and 1
2022-03-30 14:39:26 +02:00
Ophir LOJKINE
9d5ef651ae
cargo fmt
2022-03-23 18:09:23 +01:00
Ophir LOJKINE
8eedf720e7
Implement changes requested in PR
...
https://github.com/ISibboI/evalexpr/pull/101#issuecomment-1076466426
2022-03-23 16:33:53 +01:00
Ophir LOJKINE
3c4a429e8d
Remove is_sumbnormal
2022-03-23 13:11:41 +01:00
Ophir LOJKINE
ea42cf6355
Add support for is_nan, is_finite, and other floating-point testing functions
2022-03-23 13:04:09 +01:00
Ophir LOJKINE
d96ab3abf4
fix typo
2022-03-14 16:09:41 +01:00
Ophir LOJKINE
65bf8adc9c
remove duplicated code
2022-03-14 16:08:08 +01:00
Ophir LOJKINE
af77f1703e
remove unnecessary clone
2022-03-14 15:58:42 +01:00
Ophir LOJKINE
7522df14b7
remove dead code
2022-03-14 15:50:08 +01:00
Ophir LOJKINE
9eedc8e93b
cargo fmt
2022-03-14 15:07:38 +01:00
Ophir LOJKINE
a219f0b66f
Add an "if" function
...
If the first argument is true, returns the second argument, otherwise, return the third
2022-03-14 14:59:48 +01:00
Diane Sparks
d6fafc171d
Add bitwise shift functions
2022-03-06 10:17:37 -08:00
Sebastian Schmidt
79cb25bc9d
Increase test coverage.
2022-01-13 15:18:06 +02:00
Sebastian Schmidt
7af8da5cdb
Prepare 7.0.0 release.
2022-01-13 14:54:34 +02:00
Sebastian Schmidt
4e5e218d3e
Fix #94 .
...
Introduce a new error type for illegal parenthese expressions such as `4(5)`.
2022-01-13 14:50:38 +02:00
Sebastian Schmidt
ea278893ac
Prepare for 6.6.0 release.
2021-10-13 14:31:02 +03:00
Sebastian Schmidt
55092ce793
Merge branch '88_bitwise_operators' into main
...
# Conflicts:
# CHANGELOG.md
2021-10-12 15:11:56 +03:00
Sebastian Schmidt
d2f3d415df
Make functions to access operator and children of a Node public.
2021-10-12 15:10:54 +03:00