pub struct Asi<'a> { /* private fields */ }Expand description
Automatic Semicolon Insertion: strips Newline tokens, inserts Semicolon at statement boundaries.
Implementations§
Source§impl<'a> Asi<'a>
impl<'a> Asi<'a>
Sourcepub fn new(source: &'a str, file: FileId) -> Self
pub fn new(source: &'a str, file: FileId) -> Self
ASI over source, attributing every span to file (see Lexer::new).
pub fn next_token(&mut self) -> Token
pub fn finish(self) -> Result<Vec<Diagnostic>, CompileError>
pub fn into_diagnostics(self) -> Vec<Diagnostic>
Auto Trait Implementations§
impl<'a> Freeze for Asi<'a>
impl<'a> RefUnwindSafe for Asi<'a>
impl<'a> Send for Asi<'a>
impl<'a> Sync for Asi<'a>
impl<'a> Unpin for Asi<'a>
impl<'a> UnsafeUnpin for Asi<'a>
impl<'a> UnwindSafe for Asi<'a>
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