Trait ra_ap_syntax::ast::AstToken[][src]

pub trait AstToken {
    fn can_cast(token: SyntaxKind) -> bool
    where
        Self: Sized
;
fn cast(syntax: SyntaxToken) -> Option<Self>
    where
        Self: Sized
;
fn syntax(&self) -> &SyntaxToken; fn text(&self) -> &str { ... } }

Like AstNode, but wraps tokens rather than interior nodes.

Required methods

fn can_cast(token: SyntaxKind) -> bool where
    Self: Sized
[src]

fn cast(syntax: SyntaxToken) -> Option<Self> where
    Self: Sized
[src]

fn syntax(&self) -> &SyntaxToken[src]

Loading content...

Provided methods

fn text(&self) -> &str[src]

Loading content...

Implementors

Loading content...