pub fn parse_procedure(input: &str) -> IResult<&str, Procedure>Expand description
Parses a procedure expression from the input string.
This is the main entry point for parsing procedures. It attempts to parse a sequence of conditional expressions separated by semicolons, falling back to a single primary expression if no semicolons are found.
§Arguments
input- The input string to parse
§Returns
Returns IResult<&str, Procedure> containing the remaining unparsed input
and the parsed procedure.
§Examples
let result = parse_procedure("x + 1");
assert!(result.is_ok()); // Returns Procedure::Primary
let result = parse_procedure("x * 2; x + 3; x - 1");
assert!(result.is_ok()); // Returns Procedure::Array with 3 expressions