pub struct AST { /* private fields */ }
Expand description
The result of a parse
Implementations
sourceimpl AST
impl AST
sourcepub fn node(&self) -> SyntaxNode
pub fn node(&self) -> SyntaxNode
Return the root node
sourcepub fn errors(&self) -> Vec<ParseError>
pub fn errors(&self) -> Vec<ParseError>
Return all errors in the tree, if any
sourcepub fn as_result(self) -> Result<Self, ParseError>
pub fn as_result(self) -> Result<Self, ParseError>
Either return the first error in the tree, or if there are none return self
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AST
impl Send for AST
impl Sync for AST
impl Unpin for AST
impl UnwindSafe for AST
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more