def nontrivial_end_line
      if (last_child = children.last)
        last_child.line_numbers.end - 1
      elsif successor
        successor.line_numbers.begin - 1
      else
        @document.source_lines.count
      end
    end
def nontrivial_end_line
      if (last_child = children.last)
        last_child.line_numbers.end - 1
      elsif successor
        successor.line_numbers.begin - 1
      else
        @document.source_lines.count
      end
    end
Discovers the end line of the node when there are no lines.

 @return [Integer] the end line of the node