[][src]Struct lexers::Scanner

pub struct Scanner<I: Iterator> where
    I::Item: Clone
{ /* fields omitted */ }

Implementations

impl<I: Iterator<Item = char>> Scanner<I>[src]

pub fn extract_string(&mut self) -> String[src]

pub fn scan_whitespace(&mut self) -> Option<String>[src]

pub fn scan_number(&mut self) -> Option<String>[src]

pub fn scan_math_op(&mut self) -> Option<String>[src]

pub fn scan_integer(&mut self) -> Option<String>[src]

pub fn scan_quoted_string(&mut self, q: char) -> Option<String>[src]

pub fn scan_identifier(&mut self) -> Option<String>[src]

pub fn scan_unit(&mut self) -> Option<(String, String)>[src]

impl<I> Scanner<I> where
    I: Iterator,
    I::Item: Clone
[src]

pub fn new(source: I) -> Scanner<I>

Notable traits for Scanner<I>

impl<I> Iterator for Scanner<I> where
    I: Iterator,
    I::Item: Clone
type Item = I::Item;
[src]

pub fn buffer_pos(&self) -> isize[src]

pub fn set_buffer_pos(&mut self, pos: isize) -> bool[src]

pub fn current(&self) -> Option<I::Item>[src]

pub fn prev(&mut self) -> Option<I::Item>[src]

pub fn peek(&mut self) -> Option<I::Item>[src]

pub fn peek_prev(&mut self) -> Option<I::Item>[src]

pub fn view(&self) -> &[I::Item][src]

pub fn extract(&mut self) -> Vec<I::Item>[src]

impl<I> Scanner<I> where
    I: Iterator,
    I::Item: Clone + PartialEq
[src]

pub fn accept(&mut self, what: &I::Item) -> Option<I::Item>[src]

pub fn accept_any(&mut self, any: &[I::Item]) -> Option<I::Item>[src]

pub fn accept_all(&mut self, what: impl Iterator<Item = I::Item>) -> bool[src]

pub fn skip_all(&mut self, over: &[I::Item]) -> bool[src]

pub fn until_any(&mut self, any: &[I::Item]) -> bool[src]

Trait Implementations

impl<I> Iterator for Scanner<I> where
    I: Iterator,
    I::Item: Clone
[src]

type Item = I::Item

The type of the elements being iterated over.

Auto Trait Implementations

impl<I> RefUnwindSafe for Scanner<I> where
    I: RefUnwindSafe,
    <I as Iterator>::Item: RefUnwindSafe
[src]

impl<I> Send for Scanner<I> where
    I: Send,
    <I as Iterator>::Item: Send
[src]

impl<I> Sync for Scanner<I> where
    I: Sync,
    <I as Iterator>::Item: Sync
[src]

impl<I> Unpin for Scanner<I> where
    I: Unpin,
    <I as Iterator>::Item: Unpin
[src]

impl<I> UnwindSafe for Scanner<I> where
    I: UnwindSafe,
    <I as Iterator>::Item: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.