(&mut self, name: String)
| 668 | } |
| 669 | |
| 670 | pub(super) fn assign(&mut self, name: String) { |
| 671 | self.advance(); |
| 672 | self.expr(); |
| 673 | // `x = 1,` / `x = 1, 2`: a trailing comma builds a tuple right-hand side. |
| 674 | if matches!(self.peek_same_line(), Some(TokenType::Comma)) { |
| 675 | let mut count = 1u16; |
| 676 | while self.eat_if(TokenType::Comma) { |
| 677 | // A line boundary ends the tuple; `peek_same_line` won't cross the Newline. |
| 678 | if self.peek_same_line().is_none() { break; } |
| 679 | self.expr(); |
| 680 | count += 1; |
| 681 | } |
| 682 | self.chunk.emit(OpCode::BuildTuple, count); |
| 683 | } |
| 684 | self.store_name(name); |
| 685 | } |
| 686 | } |
no test coverage detected