Trait mun_syntax::ast::AstToken[][src]

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

Like an AstNode, but wraps tokens rather than interior nodes.

Required methods

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

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

Loading content...

Provided methods

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

Loading content...

Implementors

impl AstToken for Comment[src]

impl AstToken for Whitespace[src]

Loading content...