fn distance_between(prev: &Syntax, next: &Syntax) -> (usize, usize) {
    let prev_pos = prev.last_line_span();
    let next_pos = next.first_line_span();

    if let (Some(prev_pos), Some(next_pos)) = (prev_pos, next_pos) {
        if prev_pos.line != next_pos.line {
            return (next_pos.line.0 - prev_pos.line.0, 0);
        }

        return (0, next_pos.start_col - prev_pos.end_col);
    }

    (0, 0)
}
/// Return the distance between two syntax nodes, as a tuple of number
/// of lines and number of columns.
Return the distance between two syntax nodes, as a tuple of number
of lines and number of columns.
Return the distance between two syntax nodes as a tuple of number of lines and number of columns .
fn distance_between(prev: &Syntax, next: &Syntax) -> (usize, usize) {
    let prev_pos = prev.last_line_span();
    let next_pos = next.first_line_span();
    if let (Some(prev_pos), Some(next_pos)) = (prev_pos, next_pos) {
        if prev_pos.line != next_pos.line {
            return (next_pos.line.0 - prev_pos.line.0, 0);
        }
        return (0, next_pos.start_col - prev_pos.end_col);
    }
    (0, 0)
}
fn distance_between ( prev : & Syntax , next : & Syntax ) -> ( usize , usize ) { let prev_pos = prev . last_line_span ( ) ; let next_pos = next . first_line_span ( ) ; if let ( Some ( prev_pos ) , Some ( next_pos ) ) = ( prev_pos , next_pos ) { if prev_pos . line != next_pos . line { return ( next_pos . line . 0 - prev_pos . line . 0 , 0 ) ; } return ( 0 , next_pos . start_col - prev_pos . end_col ) ; } ( 0 , 0 ) }
Return the distance between two syntax nodes, as a tuple of number
of lines and number of columns.
Return the distance between two syntax nodes as a tuple of number of lines and number of columns .
prev
&Syntax
next
&Syntax