pub struct SourceTokens { /* private fields */ }Expand description
Lexer output for a source string without running the full module parser.
Use SourceFile when you also need the AST and parse diagnostics.
Implementations§
Source§impl SourceTokens
impl SourceTokens
Sourcepub fn lex_errors(&self) -> &[LexError]
pub fn lex_errors(&self) -> &[LexError]
Lexer diagnostics for malformed input.
Sourcepub fn laid_out_tokens(&self) -> &[Token]
pub fn laid_out_tokens(&self) -> &[Token]
Tokens after layout resolution (virtual braces and semicolons inserted).
Trait Implementations§
Source§impl Clone for SourceTokens
impl Clone for SourceTokens
Source§impl Debug for SourceTokens
impl Debug for SourceTokens
impl Eq for SourceTokens
Source§impl PartialEq for SourceTokens
impl PartialEq for SourceTokens
Auto Trait Implementations§
impl !Freeze for SourceTokens
impl RefUnwindSafe for SourceTokens
impl Send for SourceTokens
impl Sync for SourceTokens
impl Unpin for SourceTokens
impl UnsafeUnpin for SourceTokens
impl UnwindSafe for SourceTokens
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