parse

Macro parse 

Source
macro_rules! parse {
    ($input:expr) => { ... };
    (constant: pi) => { ... };
    (constant: e) => { ... };
    (constant: i) => { ... };
    (constant: infinity) => { ... };
}
Expand description

Parse mathematical expressions from strings

This macro provides convenient parsing of mathematical expressions.

ยงExamples

use mathhook_core::parse;

// Parse mathematical expression
let expr = parse!("x^2 + 1").unwrap();

// Mathematical constants
let pi = parse!(constant: pi);
let e = parse!(constant: e);