Trait dprint_swc_ecma_ast_view::NodeTrait [−][src]
Required methods
fn parent(&self) -> Option<Node<'a>>
[src]
fn children(&self) -> Vec<Node<'a>>
[src]
fn into_node(&self) -> Node<'a>
[src]
fn kind(&self) -> NodeKind
[src]
Provided methods
fn ancestors(&self) -> AncestorIterator<'a>ⓘNotable traits for AncestorIterator<'a>
impl<'a> Iterator for AncestorIterator<'a> type Item = Node<'a>;
[src]
Notable traits for AncestorIterator<'a>
impl<'a> Iterator for AncestorIterator<'a> type Item = Node<'a>;
fn start_line(&self) -> usize
[src]
fn end_line(&self) -> usize
[src]
fn start_column(&self) -> usize
[src]
fn end_column(&self) -> usize
[src]
fn width(&self) -> usize
[src]
fn child_index(&self) -> usize
[src]
fn previous_sibling(&self) -> Option<Node<'a>>
[src]
fn previous_siblings(&self) -> Vec<Node<'a>>
[src]
Gets the previous siblings in the order they appear in the file.
fn next_sibling(&self) -> Option<Node<'a>>
[src]
Gets the next siblings in the order they appear in the file.
fn next_siblings(&self) -> Vec<Node<'a>>
[src]
fn tokens(&self) -> &'a [TokenAndSpan]
[src]
fn children_with_tokens(&self) -> Vec<NodeOrToken<'a>>
[src]
fn children_with_tokens_fast(
&self,
program: &dyn RootNode<'a>
) -> Vec<NodeOrToken<'a>>
[src]
&self,
program: &dyn RootNode<'a>
) -> Vec<NodeOrToken<'a>>
fn leading_comments(&self) -> CommentsIterator<'a>ⓘNotable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
[src]
Notable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
fn trailing_comments(&self) -> CommentsIterator<'a>ⓘNotable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
[src]
Notable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
fn program(&self) -> Program<'a>
[src]
Gets the root node.
fn module(&self) -> &Module<'a>
[src]
Gets the root node if the view was created from a Module; otherwise panics.
fn script(&self) -> &Script<'a>
[src]
Gets the root node if the view was created from a Script; otherwise panics.
fn text(&self) -> &'a str
[src]
fn previous_token(&self) -> Option<&'a TokenAndSpan>
[src]
fn next_token(&self) -> Option<&'a TokenAndSpan>
[src]
fn previous_tokens(&self) -> &'a [TokenAndSpan]
[src]
Gets the previous tokens in the order they appear in the file.
fn next_tokens(&self) -> &'a [TokenAndSpan]
[src]
Gets the next tokens in the order they appear in the file.