pub struct Node<'tree> { /* private fields */ }Implementations§
Source§impl<'tree> Node<'tree>
impl<'tree> Node<'tree>
pub const fn id(self) -> NodeId
pub fn kind(self) -> NodeKind
pub fn as_rule(self) -> Option<RuleNodeView<'tree>>
pub fn as_terminal(self) -> Option<TerminalNodeView<'tree>>
pub fn as_error(self) -> Option<ErrorNodeView<'tree>>
pub fn children(self) -> NodeChildren<'tree> ⓘ
pub fn parent(self) -> Option<Self>
pub fn descendants(self) -> ParseTreeDescendants<'tree> ⓘ
pub fn pre_order(self) -> ParseTreeDescendants<'tree> ⓘ
pub fn text(self) -> String
pub fn to_string_tree_with_names<S: AsRef<str>>( self, rule_names: &[S], ) -> String
pub fn to_string_tree<R: Recognizer>( self, recognizer: Option<&R>, _tokens: &TokenStore, ) -> String
pub fn first_rule(self, rule_index: usize) -> Option<Self>
pub fn first_rule_stop(self, rule_index: usize) -> Option<TokenView<'tree>>
pub fn first_rule_int_return(self, rule_index: usize, name: &str) -> Option<i64>
pub fn rule_attrs<T: Any>(self) -> Option<&'tree T>
pub fn first_error_token(self) -> Option<TokenView<'tree>>
pub fn rule_invocation_stack<S: AsRef<str>>( self, rule_index: usize, rule_names: &[S], ) -> Option<Vec<String>>
Trait Implementations§
Auto Trait Implementations§
impl<'tree> !RefUnwindSafe for Node<'tree>
impl<'tree> !Send for Node<'tree>
impl<'tree> !Sync for Node<'tree>
impl<'tree> !UnwindSafe for Node<'tree>
impl<'tree> Freeze for Node<'tree>
impl<'tree> Unpin for Node<'tree>
impl<'tree> UnsafeUnpin for Node<'tree>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more