pub struct Parse { /* private fields */ }Expand description
The result of parsing: a syntax tree that covers the whole input, plus the problems found.
Implementations§
Source§impl Parse
impl Parse
Sourcepub fn syntax(&self) -> SyntaxNode
pub fn syntax(&self) -> SyntaxNode
The root of the untyped syntax tree.
Sourcepub fn tree(&self) -> SourceFile
pub fn tree(&self) -> SourceFile
The typed root of the tree.
Sourcepub fn diagnostics(&self) -> &[Diagnostic]
pub fn diagnostics(&self) -> &[Diagnostic]
Lexical and syntax errors, ordered by position.
pub fn has_errors(&self) -> bool
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