Struct sixtyfps_compilerlib::parser::SyntaxNode [−][src]
pub struct SyntaxNode { pub node: SyntaxNode<Language>, pub source_file: SourceFile, }
Fields
node: SyntaxNode<Language>
source_file: SourceFile
Implementations
Methods from Deref<Target = SyntaxNode<Language>>
Returns a green tree, equal to the green tree this node belongs two, except with this node substitute. The complexity of operation is proportional to the depth of the tree
Return the leftmost token in the subtree of this node.
Return the rightmost token in the subtree of this node.
pub fn siblings_with_tokens(
&self,
direction: Direction
) -> impl Iterator<Item = NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn descendants_with_tokens(
&self
) -> impl Iterator<Item = NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
Traverse the subtree rooted at the current node (including the current node) in preorder, excluding tokens.
pub fn preorder_with_tokens(
&self
) -> impl Iterator<Item = WalkEvent<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>>
pub fn preorder_with_tokens(
&self
) -> impl Iterator<Item = WalkEvent<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>>
Traverse the subtree rooted at the current node (including the current node) in preorder, including tokens.
Find a token in the subtree corresponding to this node, which covers the offset. Precondition: offset must be withing node’s range.
pub fn covering_element(
&self,
range: TextRange
) -> NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>
pub fn covering_element(
&self,
range: TextRange
) -> NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>
Return the deepest node or token in the current subtree that fully contains the range. If the range is empty and is contained in two leaf nodes, either one can be returned. Precondition: range must be contained withing the current node
pub fn child_or_token_at_range(
&self,
range: TextRange
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for SyntaxNode
impl !Send for SyntaxNode
impl !Sync for SyntaxNode
impl Unpin for SyntaxNode
impl !UnwindSafe for SyntaxNode
Blanket Implementations
Mutably borrows from an owned value. Read more