Struct sixtyfps_compilerlib::parser::syntax_nodes::CallbackDeclaration [−][src]
pub struct CallbackDeclaration(_);
Implementations
impl CallbackDeclaration
[src]
impl CallbackDeclaration
[src]pub fn DeclaredIdentifier(&self) -> DeclaredIdentifier
[src]
pub fn Type(&self) -> impl Iterator<Item = Type>
[src]
pub fn ReturnType(&self) -> Option<ReturnType>
[src]
pub fn new(node: SyntaxNode) -> Option<Self>
[src]
Create a new node from a SyntaxNode, if the SyntaxNode is of the correct kind
Methods from Deref<Target = SyntaxNode>
pub fn child_node(&self, kind: SyntaxKind) -> Option<SyntaxNode>
[src]
pub fn child_token(&self, kind: SyntaxKind) -> Option<SyntaxToken>
[src]
pub fn child_text(&self, kind: SyntaxKind) -> Option<String>
[src]
pub fn kind(&self) -> SyntaxKind
[src]
pub fn children(&self) -> impl Iterator<Item = SyntaxNode>
[src]
pub fn children_with_tokens(&self) -> impl Iterator<Item = NodeOrToken>
[src]
pub fn text(&self) -> SyntaxText
[src]
pub fn parent(&self) -> Option<SyntaxNode>
[src]
Methods from Deref<Target = SyntaxNode<Language>>
pub fn replace_with(&self, replacement: GreenNode) -> GreenNode
[src]
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
pub fn kind(&self) -> <L as Language>::Kind
[src]
pub fn text_range(&self) -> TextRange
[src]
pub fn text(&self) -> SyntaxText
[src]
pub fn green(&self) -> &GreenNodeData
[src]
pub fn parent(&self) -> Option<SyntaxNode<L>>
[src]
pub fn ancestors(&self) -> impl Iterator<Item = SyntaxNode<L>>
[src]
pub fn children(&self) -> SyntaxNodeChildren<L>
[src]
pub fn children_with_tokens(&self) -> SyntaxElementChildren<L>
[src]
pub fn first_child(&self) -> Option<SyntaxNode<L>>
[src]
pub fn last_child(&self) -> Option<SyntaxNode<L>>
[src]
pub fn first_child_or_token(
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
[src]
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn last_child_or_token(
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
[src]
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn next_sibling(&self) -> Option<SyntaxNode<L>>
[src]
pub fn prev_sibling(&self) -> Option<SyntaxNode<L>>
[src]
pub fn next_sibling_or_token(
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
[src]
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn prev_sibling_or_token(
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
[src]
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn first_token(&self) -> Option<SyntaxToken<L>>
[src]
Return the leftmost token in the subtree of this node.
pub fn last_token(&self) -> Option<SyntaxToken<L>>
[src]
Return the rightmost token in the subtree of this node.
pub fn siblings(
&self,
direction: Direction
) -> impl Iterator<Item = SyntaxNode<L>>
[src]
&self,
direction: Direction
) -> impl Iterator<Item = SyntaxNode<L>>
pub fn siblings_with_tokens(
&self,
direction: Direction
) -> impl Iterator<Item = NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
[src]
&self,
direction: Direction
) -> impl Iterator<Item = NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn descendants(&self) -> impl Iterator<Item = SyntaxNode<L>>
[src]
pub fn descendants_with_tokens(
&self
) -> impl Iterator<Item = NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
[src]
&self
) -> impl Iterator<Item = NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn preorder(&self) -> Preorder<L>
[src]
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>>>>
[src]
&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.
pub fn token_at_offset(&self, offset: TextSize) -> TokenAtOffset<SyntaxToken<L>>
[src]
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>>
[src]
&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>>>
[src]
&self,
range: TextRange
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
Trait Implementations
impl Clone for CallbackDeclaration
[src]
impl Clone for CallbackDeclaration
[src]fn clone(&self) -> CallbackDeclaration
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Deref for CallbackDeclaration
[src]
impl Deref for CallbackDeclaration
[src]type Target = SyntaxNode
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl From<CallbackDeclaration> for SyntaxNode
[src]
impl From<CallbackDeclaration> for SyntaxNode
[src]fn from(original: CallbackDeclaration) -> Self
[src]
impl From<SyntaxNode> for CallbackDeclaration
[src]
impl From<SyntaxNode> for CallbackDeclaration
[src]fn from(node: SyntaxNode) -> Self
[src]
impl Spanned for CallbackDeclaration
[src]
impl Spanned for CallbackDeclaration
[src]fn span(&self) -> Span
[src]
fn source_file(&self) -> Option<&SourceFile>
[src]
fn to_source_location(&self) -> SourceLocation
[src]
Auto Trait Implementations
impl !RefUnwindSafe for CallbackDeclaration
impl !RefUnwindSafe for CallbackDeclaration
impl !Send for CallbackDeclaration
impl !Send for CallbackDeclaration
impl !Sync for CallbackDeclaration
impl !Sync for CallbackDeclaration
impl Unpin for CallbackDeclaration
impl Unpin for CallbackDeclaration
impl !UnwindSafe for CallbackDeclaration
impl !UnwindSafe for CallbackDeclaration