Trait swc_ecma_parser::Input[][src]

pub trait Input: Clone {
Show methods fn cur(&mut self) -> Option<char>;
fn peek(&mut self) -> Option<char>;
fn peek_ahead(&mut self) -> Option<char>;
fn bump(&mut self);
fn is_at_start(&self) -> bool;
fn cur_pos(&mut self) -> BytePos;
fn last_pos(&self) -> BytePos;
fn slice(&mut self, start: BytePos, end: BytePos) -> &str;
fn uncons_while<F>(&mut self, f: F) -> &str
    where
        F: FnMut(char) -> bool
;
fn find<F>(&mut self, f: F) -> Option<BytePos>
    where
        F: FnMut(char) -> bool
;
fn reset_to(&mut self, to: BytePos); fn is_byte(&mut self, c: u8) -> bool { ... }
fn eat_byte(&mut self, c: u8) -> bool { ... }
}

Required methods

fn cur(&mut self) -> Option<char>[src]

fn peek(&mut self) -> Option<char>[src]

fn peek_ahead(&mut self) -> Option<char>[src]

fn bump(&mut self)[src]

fn is_at_start(&self) -> bool[src]

fn cur_pos(&mut self) -> BytePos[src]

fn last_pos(&self) -> BytePos[src]

fn slice(&mut self, start: BytePos, end: BytePos) -> &str[src]

fn uncons_while<F>(&mut self, f: F) -> &str where
    F: FnMut(char) -> bool
[src]

Takes items from stream, testing each one with predicate. returns the range of items which passed predicate.

fn find<F>(&mut self, f: F) -> Option<BytePos> where
    F: FnMut(char) -> bool
[src]

This method modifies [last_pos()] and [cur_pos()].

fn reset_to(&mut self, to: BytePos)[src]

Loading content...

Provided methods

fn is_byte(&mut self, c: u8) -> bool[src]

Implementors can override the method to make it faster.

fn eat_byte(&mut self, c: u8) -> bool[src]

Implementors can override the method to make it faster.

Loading content...

Implementors

impl<'a> Input for StringInput<'a>[src]

pub fn cur(&mut self) -> Option<char>[src]

pub fn peek(&mut self) -> Option<char>[src]

pub fn peek_ahead(&mut self) -> Option<char>[src]

pub fn bump(&mut self)[src]

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

pub fn cur_pos(&mut self) -> BytePos[src]

pub fn last_pos(&self) -> BytePos[src]

pub fn slice(&mut self, start: BytePos, end: BytePos) -> &str[src]

pub fn uncons_while<F>(&mut self, pred: F) -> &str where
    F: FnMut(char) -> bool
[src]

pub fn find<F>(&mut self, pred: F) -> Option<BytePos> where
    F: FnMut(char) -> bool
[src]

pub fn reset_to(&mut self, to: BytePos)[src]

pub fn is_byte(&mut self, c: u8) -> bool[src]

Loading content...