[][src]Struct rslint_lexer::Lexer

pub struct Lexer<'src> {
    pub file_id: usize,
    // some fields omitted
}

An extremely fast, lookup table based, lossless ECMAScript lexer

Fields

file_id: usize

Implementations

impl<'src> Lexer<'src>[src]

pub unsafe fn from_bytes(bytes: &'src [u8], file_id: usize) -> Self[src]

Make a new lexer from raw bytes.

Safety

You must make sure the bytes are valid utf8, failure to do so is undefined behavior.

pub fn from_str(string: &'src str, file_id: usize) -> Self[src]

Make a new lexer from a str, this is safe because strs are valid utf8

Trait Implementations

impl<'src> Clone for Lexer<'src>[src]

impl<'src> Debug for Lexer<'src>[src]

impl<'src> Eq for Lexer<'src>[src]

impl<'src> Hash for Lexer<'src>[src]

impl<'_> Iterator for Lexer<'_>[src]

type Item = LexerReturn

The type of the elements being iterated over.

impl<'src> PartialEq<Lexer<'src>> for Lexer<'src>[src]

impl<'src> StructuralEq for Lexer<'src>[src]

impl<'src> StructuralPartialEq for Lexer<'src>[src]

Auto Trait Implementations

impl<'src> RefUnwindSafe for Lexer<'src>

impl<'src> Send for Lexer<'src>

impl<'src> Sync for Lexer<'src>

impl<'src> Unpin for Lexer<'src>

impl<'src> UnwindSafe for Lexer<'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> Erasable for T

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.