[][src]Struct ecmascript::lexer::Lexer

pub struct Lexer<'ast> {
    pub offset: usize,
    pub line_offset: usize,
    pub line: usize,
    pub column: usize,
    // some fields omitted
}

Fields

offset: usizeline_offset: usizeline: usizecolumn: usize

Methods

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

pub fn new(
    arena: &'ast Arena,
    source: &'ast [char],
    filename: &'ast str
) -> Self
[src]

pub fn source(&self) -> &'ast [char][src]

pub fn filename(&self) -> &'ast str[src]

pub fn offset(&self) -> usize[src]

pub fn mark_token_start(&mut self)[src]

pub fn loc_start(&self) -> usize[src]

pub fn loc_end(&self) -> usize[src]

pub fn loc(&self) -> Loc[src]

pub fn span_start(&self) -> LineColumn[src]

pub fn span_end(&self) -> LineColumn[src]

pub fn span(&self) -> Span[src]

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

pub fn error(&self, lexer_error_kind: LexerErrorKind) -> Error[src]

pub fn bump(&mut self) -> Result<(), ()>[src]

pub fn bump_line(&mut self)[src]

pub fn eof(&self) -> bool[src]

pub fn read_literal_string(&mut self) -> Result<Option<Token<'ast>>, Error>[src]

pub fn read_literal_numberic(&mut self) -> Result<Option<Token<'ast>>, Error>[src]

pub fn read_identifier(&mut self) -> Result<Option<Token<'ast>>, Error>[src]

pub fn read_punctuator(&mut self) -> Result<Option<Token<'ast>>, Error>[src]

pub fn read_literal_regular_expression(
    &mut self
) -> Result<Option<Token<'ast>>, Error>
[src]

pub fn read_literal_template_string(
    &mut self
) -> Result<(LiteralString<'ast>, bool), Error>
[src]

pub fn consume(&mut self) -> Result<Option<Token<'ast>>, Error>[src]

pub fn lookahead(&mut self, ch: char) -> bool[src]

Auto Trait Implementations

impl<'ast> !Send for Lexer<'ast>

impl<'ast> !Sync for Lexer<'ast>

Blanket Implementations

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

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

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.

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

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

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