| 117 | } |
| 118 | |
| 119 | pub fn parse_unary_expression_or_higher(input: &str) -> IResult<&str, Expression> { |
| 120 | if let Ok((input, expression)) = parse_unary_expression_argument(input) { |
| 121 | return Ok((input, expression)); |
| 122 | } |
| 123 | |
| 124 | let (input, operator) = parse_unary_operator(input)?; |
| 125 | let (input, argument) = parse_unary_expression_argument(input)?; |
| 126 | |
| 127 | Ok(( |
| 128 | input, |
| 129 | Expression::UnaryExpression(Box::new(UnaryExpression { operator, argument })), |
| 130 | )) |
| 131 | } |
| 132 | |
| 133 | pub fn parse_binary_expression_or_highier( |
| 134 | input: &str, |