     // The leading trivia of the next token, after the ignored node, may contain content that
     // belongs with the ignored node. The trivia extraction that is performed for `lastToken` later
     // excludes that content so it needs to be extracted and added to the token stream here.
-    if let next = node.lastToken?.nextToken, let trivia = next.leadingTrivia.first {
+    if let next = node.lastToken?.nextToken(viewMode: .all), let trivia = next.leadingTrivia.first {
       switch trivia {
       case .lineComment, .blockComment:
         trivia.write(to: &nodeText)

  /// alongside the last token of the given node. Any tokens between `node.lastToken` and the
  /// returned node's `lastToken` are delimiter tokens that shouldn't be preceded by a break.
  private func outermostEnclosingNode(from node: Syntax) -> Syntax? {
    guard let afterToken = node.lastToken?.nextToken, closingDelimiterTokens.contains(afterToken)
    else {
      return nil
    }
    var parenthesizedExpr = afterToken.parent
    while let nextToken = parenthesizedExpr?.lastToken?.nextToken,
      closingDelimiterTokens.contains(nextToken),
      let nextExpr = nextToken.parent
    {

  override func visit(_ node: SequenceExprSyntax) -> ExprSyntax {
    for element in node.elements {
      if let binaryOperatorExpr = element.as(BinaryOperatorExprSyntax.self),
        let followingToken = binaryOperatorExpr.operatorToken.nextToken(viewMode: .all),
        followingToken.leadingTrivia.hasLineComment
      {
        // Rewrite the trivia so that the comment is in the operator token's leading trivia.
