[][src]Struct antlr_rust::lexer::BaseLexer

pub struct BaseLexer<T: LexerRecog<Recog = Self> + 'static> {
    pub interpreter: Option<LexerATNSimulator>,
    pub input: Option<Box<dyn CharStream>>,
    pub token_start_char_index: isize,
    pub token_start_line: isize,
    pub token_start_column: isize,
    pub token_type: isize,
    pub token: Option<Box<dyn Token>>,
    pub channel: isize,
    pub mode: usize,
    pub text: String,
    // some fields omitted
}

Fields

interpreter: Option<LexerATNSimulator>input: Option<Box<dyn CharStream>>token_start_char_index: isizetoken_start_line: isizetoken_start_column: isizetoken_type: isizetoken: Option<Box<dyn Token>>channel: isizemode: usizetext: String

Methods

impl<T: LexerRecog<Recog = Self> + 'static> BaseLexer<T>[src]

pub fn get_type(&self) -> isize[src]

pub fn get_char_index(&self) -> isize[src]

pub fn get_text(&self) -> String[src]

pub fn set_text(&self, _text: String)[src]

pub fn add_error_listener(&mut self, listener: Box<dyn ErrorListener>)[src]

Add error listener

pub fn remove_error_listeners(&mut self)[src]

pub fn new_base_lexer(
    input: Box<dyn CharStream>,
    interpreter: LexerATNSimulator,
    recog: Box<T>
) -> BaseLexer<T>
[src]

Trait Implementations

impl<T: LexerRecog<Recog = Self> + 'static> Lexer for BaseLexer<T>[src]

impl<T: LexerRecog<Recog = Self> + 'static> Recognizer for BaseLexer<T>[src]

impl<T: LexerRecog<Recog = Self> + 'static> TokenSource for BaseLexer<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for BaseLexer<T>

impl<T> !Send for BaseLexer<T>

impl<T> !Sync for BaseLexer<T>

impl<T> Unpin for BaseLexer<T>

impl<T> !UnwindSafe for BaseLexer<T>

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, 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.