(&mut self)
| 809 | self.expect_lbrace()?; |
| 810 | self.consume_terminators(); // skip the newline after `{` |
| 811 | |
| 812 | let mut lines = Vec::new(); |
| 813 | |
| 814 | while !self.check_rbrace() && !self.is_eof() { |
| 815 | if matches!(self.peek(), Some(Token::StatementTerminator)) { |
| 816 | let source = Self::normalize_asm_line(&self.spans[self.pos].source_line); |
| 817 | self.advance(); |
| 818 | if !source.is_empty() { |
| 819 | lines.push(source); |
| 820 | } |
| 821 | } else { |
| 822 | self.advance(); |
| 823 | } |
| 824 | } |
| 825 | |
| 826 | // The loop does not capture a one-line block before reaching `}`. |
| 827 | if !self.is_eof() { |
| 828 | let source = Self::normalize_asm_line(&self.spans[self.pos].source_line); |
| 829 | if !source.is_empty() { |
| 830 | lines.push(source); |
| 831 | } |
| 832 | } |
| 833 | |
| 834 | self.expect_rbrace()?; |
| 835 | Ok(Statement::AsmBlock { |
| 836 | ops: self.parse_asm_ops(lines)?, |
| 837 | }) |
| 838 | } |
| 839 | |
| 840 | // Strip the wrapper carried by opening and one-line asm source lines. |
no test coverage detected