[−][src]Trait swc_ecma_parser::Input
Required methods
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, f: F) -> &str where
F: FnMut(char) -> bool,
[src]
F: FnMut(char) -> bool,
Takes items from stream, testing each one with predicate. returns the range of items which passed predicate.
pub fn find<F>(&mut self, f: F) -> Option<BytePos> where
F: FnMut(char) -> bool,
[src]
F: FnMut(char) -> bool,
This method modifies [last_pos()] and [cur_pos()].
pub fn reset_to(&mut self, to: BytePos)
[src]
Provided methods
pub fn is_byte(&mut self, c: u8) -> bool
[src]
Implementors can override the method to make it faster.
pub fn eat_byte(&mut self, c: u8) -> bool
[src]
Implementors can override the method to make it faster.
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]
F: FnMut(char) -> bool,
pub fn find<F>(&mut self, pred: F) -> Option<BytePos> where
F: FnMut(char) -> bool,
[src]
F: FnMut(char) -> bool,