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