| 140 | } |
| 141 | |
| 142 | fn recurse_binary<'a>( |
| 143 | binary: &'a ExprBinOp, |
| 144 | leading_comments: &'a [SourceComment], |
| 145 | trailing_comments: &'a [SourceComment], |
| 146 | comments: &'a Comments, |
| 147 | trivia: &TriviaRanges, |
| 148 | parts: &mut SmallVec<[OperandOrOperator<'a>; 8]>, |
| 149 | ) { |
| 150 | rec( |
| 151 | Operand::Left { |
| 152 | leading_comments, |
| 153 | expression: &binary.left, |
| 154 | }, |
| 155 | comments, |
| 156 | trivia, |
| 157 | parts, |
| 158 | ); |
| 159 | |
| 160 | parts.push(OperandOrOperator::Operator(Operator { |
| 161 | symbol: OperatorSymbol::Binary(binary.op), |
| 162 | trailing_comments: comments.dangling(binary), |
| 163 | })); |
| 164 | |
| 165 | rec( |
| 166 | Operand::Right { |
| 167 | expression: binary.right.as_ref(), |
| 168 | trailing_comments, |
| 169 | }, |
| 170 | comments, |
| 171 | trivia, |
| 172 | parts, |
| 173 | ); |
| 174 | } |
| 175 | |
| 176 | fn rec<'a>( |
| 177 | operand: Operand<'a>, |