| Crates.io | lexper |
| lib.rs | lexper |
| version | 0.0.3 |
| created_at | 2025-06-27 23:04:44.355076+00 |
| updated_at | 2025-07-02 14:52:19.158854+00 |
| description | A simple CLI calculator with a handwritten lexer and parser in Rust. |
| homepage | https://github.com/JerryImMouse/lexper |
| repository | https://github.com/JerryImMouse/lexper |
| max_upload_size | |
| id | 1729365 |
| size | 28,391 |
lexper is a small & lightweight calculator written in Rust with custom lexer and parser.
It also supports constants and function calls.
Just use cargo add lexper or add the following line to your Cargo.toml:
[dependencies]
lexper = "*" # use the latest version or "*" for the latest
lexper can be used by 3 ways.
{} + 2Here is the most simple one, the last.
use lexper;
fn main() {
let result = lexper::eval!("{} + 2", 5).unwrap();
println!("{}", result);
}