[][src]Struct antlr_rust::common_token_stream::CommonTokenStream

pub struct CommonTokenStream<'input, T: TokenSource<'input>> { /* fields omitted */ }

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]

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]

impl<'input, T: TokenSource<'input>> TidAble<'input> for CommonTokenStream<'input, T> where
    T: TidAble<'input>, 
[src]

type Static = __CommonTokenStreaminputT_should_never_exist<T::Static>

impl<'input, T: TokenSource<'input>> TokenStream<'input> for CommonTokenStream<'input, T>[src]

type TF = T::TF

Token factory that created tokens in this stream

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]

impl<'input, T> Send for CommonTokenStream<'input, T> where
    T: Send,
    <<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: Send
[src]

impl<'input, T> Sync for CommonTokenStream<'input, T> where
    T: Sync,
    <<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: Sync
[src]

impl<'input, T> Unpin for CommonTokenStream<'input, T> where
    T: Unpin,
    <<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: Unpin
[src]

impl<'input, T> UnwindSafe for CommonTokenStream<'input, T> where
    T: UnwindSafe,
    <<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> NodeText for T[src]

impl<'a, T> Tid<'a> for T where
    T: TidAble<'a> + ?Sized
[src]

impl<'a, X> TidExt<'a> for X where
    X: Tid<'a> + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.