pub struct ParseTreeStorage { /* private fields */ }Expand description
Flat, structure-of-arrays concrete syntax tree storage.
Every node is addressed by NodeId. Rule children occupy one range in
children; child_links is parser scratch used only while rule contexts
are open and is never exposed as part of the completed tree.
Implementations§
Source§impl ParseTreeStorage
impl ParseTreeStorage
pub const fn new() -> Self
pub const fn node_count(&self) -> usize
pub const fn edge_count(&self) -> usize
pub const fn extra_count(&self) -> usize
pub const fn stats(&self) -> ParseTreeStats
pub fn node<'tree>( &'tree self, tokens: &'tree TokenStore, id: NodeId, ) -> Option<Node<'tree>>
Trait Implementations§
Source§impl Debug for ParseTreeStorage
impl Debug for ParseTreeStorage
Source§impl Default for ParseTreeStorage
impl Default for ParseTreeStorage
Source§fn default() -> ParseTreeStorage
fn default() -> ParseTreeStorage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ParseTreeStorage
impl !Send for ParseTreeStorage
impl !Sync for ParseTreeStorage
impl !UnwindSafe for ParseTreeStorage
impl Freeze for ParseTreeStorage
impl Unpin for ParseTreeStorage
impl UnsafeUnpin for ParseTreeStorage
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