pub fn parse_string_to_formula(
    s: &str,
    f: Option<&impl Fn(String, Vec<f32>) -> types::Value>,
) -> types::Formula {
    match parse_string(&s) {
        Some(parse_result) => match parse_result.as_rule() {
            Rule::expr => build_formula_with_climber(parse_result.into_inner(), f),
            Rule::string_constant => parse_string_constant(parse_result),
            _ => unreachable!(),
        },
        None => types::Formula::Value(types::Value::Error(types::Error::Parse)),
    }
}
/// Parses a string and stores it in Formula Enum.
Parses a string and stores it in Formula Enum.
Parses a string and stores it in Formula Enum .
pub fn parse_string_to_formula(
    s: &str,
    f: Option<&impl Fn(String, Vec<f32>) -> types::Value>,
) -> types::Formula {
    match parse_string(&s) {
        Some(parse_result) => match parse_result.as_rule() {
            Rule::expr => build_formula_with_climber(parse_result.into_inner(), f),
            Rule::string_constant => parse_string_constant(parse_result),
            _ => unreachable!(),
        },
        None => types::Formula::Value(types::Value::Error(types::Error::Parse)),
    }
}
pub fn parse_string_to_formula ( s : & str , f : Option < & impl Fn ( String , Vec < f32 > ) -> types :: Value > , ) -> types :: Formula { match parse_string ( & s ) { Some ( parse_result ) => match parse_result . as_rule ( ) { Rule :: expr => build_formula_with_climber ( parse_result . into_inner ( ) , f ) , Rule :: string_constant => parse_string_constant ( parse_result ) , _ => unreachable ! ( ) , } , None => types :: Formula :: Value ( types :: Value :: Error ( types :: Error :: Parse ) ) , } }
Parses a string and stores it in Formula Enum.
Parses a string and stores it in Formula Enum .
s
&str
f
Option<&impl Fn(String, Vec<f32>) -> types::Value>