pub struct LexOutput {
pub tokens: Vec<Token>,
pub diagnostics: Vec<Diagnostic>,
}Expand description
The result of lexing one source file: the token stream and any diagnostics.
Diagnostics are returned alongside tokens rather than via Result because a
single bad byte should not abort lexing the rest of the file — the LSP needs
to keep reporting problems past the first one (§17.1, “multiple diagnostics
from one malformed file”).
Fields§
§tokens: Vec<Token>§diagnostics: Vec<Diagnostic>Trait Implementations§
Auto Trait Implementations§
impl Freeze for LexOutput
impl RefUnwindSafe for LexOutput
impl Send for LexOutput
impl Sync for LexOutput
impl Unpin for LexOutput
impl UnsafeUnpin for LexOutput
impl UnwindSafe for LexOutput
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