rowan::cursor

Type Alias SyntaxElement

Source
pub type SyntaxElement = NodeOrToken<SyntaxNode, SyntaxToken>;

Aliased Type§

enum SyntaxElement {
    Node(SyntaxNode),
    Token(SyntaxToken),
}

Variants§

Implementations§

Trait Implementations§

Source§

impl<L: Language> From<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>> for SyntaxElement

Source§

fn from(element: SyntaxElement<L>) -> SyntaxElement

Converts to this type from the input type.
Source§

impl From<SyntaxNode> for SyntaxElement

Source§

fn from(node: SyntaxNode) -> SyntaxElement

Converts to this type from the input type.
Source§

impl From<SyntaxToken> for SyntaxElement

Source§

fn from(token: SyntaxToken) -> SyntaxElement

Converts to this type from the input type.