Struct debris_parser::syntax_tree::SyntaxTree
source · pub struct SyntaxTree {
nodes: Vec<Node>,
pub errors: Vec<ParseErrorKind>,
pub root: Option<NodeId>,
}
Fields§
§nodes: Vec<Node>
§errors: Vec<ParseErrorKind>
§root: Option<NodeId>
Implementations§
source§impl SyntaxTree
impl SyntaxTree
sourcepub(crate) fn combine_errors(&mut self)
pub(crate) fn combine_errors(&mut self)
Combines similar errors to avoid some visual noise
pub fn debug_fmt<'a>(&'a self, source: &'a str) -> impl Display + '_
pub fn to_string(&self, source: &str) -> Box<str>
pub fn insert(&mut self, kind: NodeKind, children: Box<[NodeChild]>) -> NodeId
pub fn get(&self, NodeId: NodeId) -> &Node
pub fn get_mut(&mut self, NodeId: NodeId) -> &mut Node
fn write_string(&self, buf: &mut String, source: &str, node_id: NodeId)
Trait Implementations§
source§impl Debug for SyntaxTree
impl Debug for SyntaxTree
source§impl Default for SyntaxTree
impl Default for SyntaxTree
source§fn default() -> SyntaxTree
fn default() -> SyntaxTree
Returns the “default value” for a type. Read more
source§impl Index<NodeId> for SyntaxTree
impl Index<NodeId> for SyntaxTree
Auto Trait Implementations§
impl RefUnwindSafe for SyntaxTree
impl Send for SyntaxTree
impl Sync for SyntaxTree
impl Unpin for SyntaxTree
impl UnwindSafe for SyntaxTree
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