pub struct ParseOutput {
pub tree: SyntaxNode,
pub tokens: Vec<Token>,
pub diagnostics: Vec<Diagnostic>,
}Expand description
The result of parsing one source file: the lossless tree, the lexed tokens, and any diagnostics (lex + parse merged).
Fields§
§tree: SyntaxNodeThe lossless syntax tree (trivia retained). Always produced, even when
the input is malformed — error nodes (SyntaxKind::PARSE_ERROR) carry
the tokens the parser could not place.
tokens: Vec<Token>The token stream from the lex pass, kept for later LSP use (semantic tokens) and diagnostics.
diagnostics: Vec<Diagnostic>Lex (T0xx) and parse (P0xx) diagnostics, in source order.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ParseOutput
impl !Send for ParseOutput
impl !Sync for ParseOutput
impl !UnwindSafe for ParseOutput
impl Freeze for ParseOutput
impl Unpin for ParseOutput
impl UnsafeUnpin for ParseOutput
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