pub struct Parse { /* private fields */ }Expand description
A completed parse: green tree + accumulated syntax errors.
Implementations§
Source§impl Parse
impl Parse
Sourcepub fn syntax(&self) -> SyntaxNode
pub fn syntax(&self) -> SyntaxNode
Root SyntaxNode view of the parsed tree. Cheap to clone —
the underlying GreenNode is ref-counted.
Sourcepub fn green(&self) -> &GreenNode
pub fn green(&self) -> &GreenNode
Raw rowan green tree backing the parse. Usually
syntax() is what you want; green() is exposed for
callers that want to share the tree by reference.
Sourcepub fn errors(&self) -> &[SyntaxError]
pub fn errors(&self) -> &[SyntaxError]
Accumulated syntax errors in source order. Empty when the parse was fully clean.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parse
impl RefUnwindSafe for Parse
impl Send for Parse
impl Sync for Parse
impl Unpin for Parse
impl UnsafeUnpin for Parse
impl UnwindSafe for Parse
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