Skip to main content

Scanner

Struct Scanner 

Source
pub struct Scanner<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Scanner<'a>

Source

pub fn token(&self) -> &Token

Source

pub fn new(input: &'a str, fold_case: bool, prescan: bool) -> Self

Source

pub fn has_token(&self, kind: &[TokenKind]) -> bool

Source

pub fn has_next(&self) -> bool

Source

pub fn next(&mut self)

Source

pub fn scan_general_number(&mut self, exact: Option<bool>)

Source

pub fn scan_character_literal(&mut self)

Source

pub fn scan_signed_number(&mut self, radix: u32)

Source

pub fn scan_ident(&mut self)

Source

pub fn scan_hex_number(&mut self, max_digits: usize) -> Option<Fixnum>

Source

pub fn scan_number(&mut self, radix: u32, neg: bool, dot: bool)

Scans the next characters as an unsigned integer or floating point number.

Source

pub fn scan_imaginary_part(&mut self, real_part: f64, neg: bool)

Source

pub fn scan_string(&mut self)

Source

pub fn scan_delimited_ident(&mut self)

Source

pub fn scan_char_subsequence_until( &mut self, terminator: char, ) -> CharSubsequentResult

Source

pub fn scan_hex_char(&mut self) -> Option<char>

Source

pub fn signal(&mut self, error: LexicalError)

Source

pub fn next_ch(&mut self)

Source

pub fn skip_space(&mut self)

Source

pub fn skip_comment(&mut self)

Auto Trait Implementations§

§

impl<'a> Freeze for Scanner<'a>

§

impl<'a> RefUnwindSafe for Scanner<'a>

§

impl<'a> Send for Scanner<'a>

§

impl<'a> Sync for Scanner<'a>

§

impl<'a> Unpin for Scanner<'a>

§

impl<'a> UnsafeUnpin for Scanner<'a>

§

impl<'a> UnwindSafe for Scanner<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.