Trait SyntaxNodeExtTrait

Source
pub trait SyntaxNodeExtTrait {
    // Required methods
    fn token_text(&self) -> String;
    fn deep_eq(&self, other: &Self) -> bool;
}

Required Methods§

Source

fn token_text(&self) -> String

walks tokens collecting each tokens text into a final String.

Source

fn deep_eq(&self, other: &Self) -> bool

rowan::SyntaxNode by default only compares pointer equality this method addition allows comparison of every token, the same file parsed multiple times will return true, with pointer eq this would be false.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§