[−][src]Struct rslint_parser::TokenSource
The source of tokens for the parser
Fields
raw_tokens: &'t [Token]
A list of the tokens including whitespace.
Implementations
impl<'t> TokenSource<'t>
[src]
pub fn new(source: &'t str, raw_tokens: &'t [Token]) -> TokenSource<'t>
[src]
Generate input from tokens(except comments and whitespace).
Panics
This method will panic in case the source and raw tokens do not match as it relies on the source code for checking if trivia contains linebreaks
pub fn rewind(&mut self, pos: usize)
[src]
Rewind the current position to a former position.
pub fn last(&self) -> Option<Token>
[src]
pub fn current(&self) -> Token
[src]
pub fn source(&self) -> &str
[src]
pub fn lookahead_nth(&self, n: usize) -> Token
[src]
pub fn bump(&mut self)
[src]
pub fn is_keyword(&self, kw: &str) -> bool
[src]
pub fn had_linebreak_before_nth(&self, n: usize) -> bool
[src]
pub fn cur_pos(&self) -> usize
[src]
pub fn cur_token_idx(&self) -> usize
[src]
pub fn size_hint(&self) -> usize
[src]
Auto Trait Implementations
impl<'t> RefUnwindSafe for TokenSource<'t>
impl<'t> Send for TokenSource<'t>
impl<'t> Sync for TokenSource<'t>
impl<'t> Unpin for TokenSource<'t>
impl<'t> UnwindSafe for TokenSource<'t>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erasable for T
unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>
const ACK_1_1_0: bool
fn erase(this: NonNull<Self>) -> NonNull<Erased>
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>,