Trait apollo_parser::ast::AstToken
source · pub trait AstToken {
fn can_cast(token: SyntaxKind) -> bool
where
Self: Sized;
fn cast(syntax: SyntaxToken<GraphQLLanguage>) -> Option<Self>
where
Self: Sized;
fn syntax(&self) -> &SyntaxToken<GraphQLLanguage>;
fn text(&self) -> &str { ... }
}
Expand description
Like AstNode
, but wraps tokens rather than interior nodes.