[−][src]Struct ecmascript::lexer::Lexer
Fields
offset: usize
line_offset: usize
line: usize
column: usize
Methods
impl<'ast> Lexer<'ast>
[src]
pub fn new(
arena: &'ast Arena,
source: &'ast [char],
filename: &'ast str
) -> Self
[src]
arena: &'ast Arena,
source: &'ast [char],
filename: &'ast str
) -> Self
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]
&mut self
) -> Result<Option<Token<'ast>>, Error>
pub fn read_literal_template_string(
&mut self
) -> Result<(LiteralString<'ast>, bool), Error>
[src]
&mut self
) -> Result<(LiteralString<'ast>, bool), Error>
pub fn consume(&mut self) -> Result<Option<Token<'ast>>, Error>
[src]
pub fn lookahead(&mut self, ch: char) -> bool
[src]
Auto Trait Implementations
Blanket Implementations
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,