pub trait TypedSyntaxNode {
    type StablePtr;
    type Green;

    const OPTIONAL_KIND: Option<SyntaxKind>;

    fn missing(db: &dyn SyntaxGroup) -> Self::Green;
    fn from_syntax_node(db: &dyn SyntaxGroup, node: SyntaxNode) -> Self;
    fn from_ptr(
        db: &dyn SyntaxGroup,
        root: &SyntaxFile,
        node: Self::StablePtr
    ) -> Self; fn as_syntax_node(&self) -> SyntaxNode; fn stable_ptr(&self) -> Self::StablePtr; }
Expand description

Trait for the typed view of the syntax tree. All the internal node implementations are under the ast module.

Required Associated Types§

Required Associated Constants§

The relevant SyntaxKind. None for enums.

Required Methods§

Implementors§