[−][src]Struct antlr_rust::common_token_stream::CommonTokenStream
Default token stream that skips token that not correspond to current channel.
Implementations
impl<'input, T: TokenSource<'input>> CommonTokenStream<'input, T>
[src]
pub fn new(lexer: T) -> CommonTokenStream<'input, T>
[src]
Creates CommonTokenStream that produces tokens from TOKEN_DEFAULT_CHANNEL
pub fn with_channel(lexer: T, channel: isize) -> CommonTokenStream<'input, T>
[src]
Creates CommonTokenStream that produces tokens from channel
pub fn reset(&mut self)
[src]
Restarts this token stream
pub fn iter(&mut self) -> IterWrapper<'_, Self>ⓘNotable traits for IterWrapper<'a, T>
impl<'a, T: IntStream> Iterator for IterWrapper<'a, T> type Item = isize;
[src]
Notable traits for IterWrapper<'a, T>
impl<'a, T: IntStream> Iterator for IterWrapper<'a, T> type Item = isize;
Creates iterator over this token stream
Trait Implementations
impl<'input, T: Debug + TokenSource<'input>> Debug for CommonTokenStream<'input, T>
[src]
impl<'input, T: TokenSource<'input>> IntStream for CommonTokenStream<'input, T>
[src]
pub fn consume(&mut self)
[src]
pub fn la(&mut self, i: isize) -> isize
[src]
pub fn mark(&mut self) -> isize
[src]
pub fn release(&mut self, _marker: isize)
[src]
pub fn index(&self) -> isize
[src]
pub fn seek(&mut self, index: isize)
[src]
pub fn size(&self) -> isize
[src]
pub fn get_source_name(&self) -> String
[src]
impl<'input, T: TokenSource<'input>> TidAble<'input> for CommonTokenStream<'input, T> where
T: TidAble<'input>,
[src]
T: TidAble<'input>,
impl<'input, T: TokenSource<'input>> TokenStream<'input> for CommonTokenStream<'input, T>
[src]
type TF = T::TF
Token factory that created tokens in this stream
pub fn lt(
&mut self,
k: isize
) -> Option<&<Self::TF as TokenFactory<'input>>::Tok>
[src]
&mut self,
k: isize
) -> Option<&<Self::TF as TokenFactory<'input>>::Tok>
pub fn get(&self, index: isize) -> &<Self::TF as TokenFactory<'input>>::Tok
[src]
pub fn get_token_source(&self) -> &dyn TokenSource<'input, TF = Self::TF>
[src]
pub fn get_text_from_interval(&self, start: isize, stop: isize) -> String
[src]
pub fn get_all_text(&self) -> String
[src]
pub fn get_text_from_tokens<T: Token + ?Sized>(&self, a: &T, b: &T) -> String where
Self: Sized,
[src]
Self: Sized,
Auto Trait Implementations
impl<'input, T> RefUnwindSafe for CommonTokenStream<'input, T> where
T: RefUnwindSafe,
<<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: RefUnwindSafe,
[src]
T: RefUnwindSafe,
<<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: RefUnwindSafe,
impl<'input, T> Send for CommonTokenStream<'input, T> where
T: Send,
<<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: Send,
[src]
T: Send,
<<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: Send,
impl<'input, T> Sync for CommonTokenStream<'input, T> where
T: Sync,
<<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: Sync,
[src]
T: Sync,
<<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: Sync,
impl<'input, T> Unpin for CommonTokenStream<'input, T> where
T: Unpin,
<<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: Unpin,
[src]
T: Unpin,
<<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: Unpin,
impl<'input, T> UnwindSafe for CommonTokenStream<'input, T> where
T: UnwindSafe,
<<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: UnwindSafe,
[src]
T: UnwindSafe,
<<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: UnwindSafe,
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> NodeText for T
[src]
impl<'a, T> Tid<'a> for T where
T: TidAble<'a> + ?Sized,
[src]
T: TidAble<'a> + ?Sized,
impl<'a, X> TidExt<'a> for X where
X: Tid<'a> + ?Sized,
[src]
X: Tid<'a> + ?Sized,
pub fn is<T>(&self) -> bool where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_ref<T>(&'b self) -> Option<&'b T> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_mut<T>(&'b mut self) -> Option<&'b mut T> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_rc<T>(self: Rc<X>) -> Result<Rc<T>, Rc<X>> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_arc<T>(self: Arc<X>) -> Result<Arc<T>, Arc<X>> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_box<T>(
self: Box<X, Global>
) -> Result<Box<T, Global>, Box<X, Global>> where
T: Tid<'a>,
[src]
self: Box<X, Global>
) -> Result<Box<T, Global>, Box<X, Global>> where
T: Tid<'a>,
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.
pub 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>,