pub trait SemanticTokensProvider<L>where
L: Language,{
// Required method
fn semantic_tokens<S>(
&self,
root: &RedNode<'_, L>,
source: &S,
line_map: &LineMap,
) -> Vec<SemanticToken>
where S: Source + ?Sized;
}Expand description
Trait for languages that support semantic highlighting.
Required Methods§
Sourcefn semantic_tokens<S>(
&self,
root: &RedNode<'_, L>,
source: &S,
line_map: &LineMap,
) -> Vec<SemanticToken>
fn semantic_tokens<S>( &self, root: &RedNode<'_, L>, source: &S, line_map: &LineMap, ) -> Vec<SemanticToken>
Returns the semantic tokens for the given document.
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.