Parses a `FUNCTION` definition.
(&mut self, function_pos: LineCol)
| 1517 | |
| 1518 | /// Parses a `FUNCTION` definition. |
| 1519 | fn parse_function(&mut self, function_pos: LineCol) -> Result<Statement> { |
| 1520 | let (name, name_pos, params) = self.parse_callable_signature(false, true)?; |
| 1521 | let (body, end_pos) = self.parse_callable_body(function_pos, Token::Function)?; |
| 1522 | Ok(Statement::Callable(CallableSpan { name, name_pos, params, body, end_pos })) |
| 1523 | } |
| 1524 | |
| 1525 | /// Parses a `SUB` definition. |
| 1526 | fn parse_sub(&mut self, sub_pos: LineCol) -> Result<Statement> { |
no test coverage detected