(&mut self)
| 414 | |
| 415 | fn parse_unary(&mut self) -> Result<(), CompileError> { |
| 416 | self.skip_ws(); |
| 417 | if self.eat(b'+') { |
| 418 | return self.parse_unary(); |
| 419 | } |
| 420 | if self.eat(b'-') { |
| 421 | self.parse_unary()?; |
| 422 | self.ops.push(Op::Neg); |
| 423 | return Ok(()); |
| 424 | } |
| 425 | self.parse_primary() |
| 426 | } |
| 427 | |
| 428 | fn parse_primary(&mut self) -> Result<(), CompileError> { |
| 429 | self.skip_ws(); |
| 430 | if self.eat(b'(') { |
| 431 | self.parse_expr()?; |
| 432 | self.skip_ws(); |
| 433 | self.expect(b')')?; |
| 434 | return Ok(()); |
no test coverage detected