Trait ra_ap_parser::TokenSource [−][src]
pub trait TokenSource { fn current(&self) -> Token; fn lookahead_nth(&self, n: usize) -> Token; fn bump(&mut self); fn is_keyword(&self, kw: &str) -> bool; }
Expand description
TokenSource
abstracts the source of the tokens parser operates on.
Hopefully this will allow us to treat text and token trees in the same way!
Required methods
fn lookahead_nth(&self, n: usize) -> Token
fn lookahead_nth(&self, n: usize) -> Token
Lookahead n token
fn is_keyword(&self, kw: &str) -> bool
fn is_keyword(&self, kw: &str) -> bool
Is the current token a specified keyword?