Parses a block into an Expr
(expression: Pair<Rule>)
| 325 | |
| 326 | //Parses a block into an Expr |
| 327 | fn parse_block(expression: Pair<Rule>) -> ExprBlock { |
| 328 | let mut exprs: Vec<Expr> = Vec::new(); |
| 329 | for statement in expression.into_inner() { |
| 330 | if statement.clone().into_inner().next().is_some() { |
| 331 | exprs.push(parse_statement(statement)); |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | ExprBlock { exprs } |
| 336 | } |
| 337 | |
| 338 | // TESTS |
| 339 | #[cfg(test)] |
no test coverage detected