[−][src]Struct libslide::scanner::Scanner
Fields
pos: usize
input: Vec<char>
leading_trivia_start: usize
output: Vec<Token>
diagnostics: Vec<Diagnostic>
Implementations
impl Scanner
[src]
pub fn new(input: &str) -> Scanner
[src]
Instantiate a new scanner.
fn peek(&self) -> Option<&char>
[src]
fn next(&mut self) -> Option<&char>
[src]
fn push_diag(&mut self, diagnostic: Diagnostic)
[src]
fn push_tok<S: Into<Span>>(&mut self, ty: TokenType, span: S)
[src]
fn collect_while(&mut self, pred: fn(_: &char) -> bool) -> String
[src]
pub fn scan(&mut self)
[src]
fn scan_trivia(&mut self)
[src]
Scans leading trivia, including whitespace.
fn scan_symbol(&mut self)
[src]
Matches a symbol with a token and creates it.
fn scan_num(&mut self)
[src]
Scans through the content of a number to create a token of that value.
fn scan_var_str(&mut self) -> String
[src]
fn scan_var(&mut self)
[src]
fn scan_var_pattern(&mut self)
[src]
fn scan_const_pattern(&mut self)
[src]
fn scan_any_pattern(&mut self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Scanner
impl Send for Scanner
impl Sync for Scanner
impl Unpin for Scanner
impl UnwindSafe for Scanner
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,