You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-1Lines changed: 35 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,41 @@ Rhs:
114
114
115
115
```
116
116
117
-
A binary expression contains two operands separated by an operator. All the binary operators have right-to-left associativity while their precedences may be not the same.
117
+
A binary expression contains two operands separated by an operator. All the binary operators have right-to-left associativity while their precedences may be not the same. The supported binary operators are as below:
Copy file name to clipboardExpand all lines: src/lib.rs
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,14 @@
1
+
//! Expression engine is a library written in pure Rust which provides an engine to compile and execute expressions.
2
+
//! An expression indicates a string-like sentence that can be executed with some contexts and return a value (mostly, but not limited to, boolean, string and number).
3
+
//! Expression engine aims to provide an engine for users that can execute complex logics using configurations without recompiling.
4
+
//! It's a proper alternative as the basis to build business rule engines.
5
+
//! ## Features
6
+
7
+
//! + Easy to Use (three lines at least)
8
+
//! + Abundant Types and Expressions (Five fundamental types and seven kinds of expressions)
9
+
//! + Pre-defined Operators Support (Common boolean, numeric and string operators)
10
+
//! + Support function and operators registration
11
+
//! + Support operator redirection
1
12
mod ast;
2
13
mod define;
3
14
mod error;
@@ -11,6 +22,22 @@ mod tokenizer;
11
22
mod value;
12
23
mod context;
13
24
25
+
/// ## Usage
26
+
///
27
+
/// Calling the engine is simple. At first, define the expression you want to execute. Secondly, create a context to cache the pre-defined inner functions and variables. And then, register the variables and functions to the context. Finally, call the execute function with the expression and context to get the executing result.
0 commit comments