Skip to main content

Token

Trait Token 

Source
pub trait Token: Debug {
    // Required methods
    fn token_type(&self) -> i32;
    fn channel(&self) -> i32;
    fn start(&self) -> usize;
    fn stop(&self) -> usize;
    fn token_index(&self) -> isize;
    fn line(&self) -> usize;
    fn column(&self) -> usize;
    fn text(&self) -> Option<&str>;
    fn source_name(&self) -> &str;

    // Provided method
    fn interval(&self) -> TextInterval { ... }
}

Required Methods§

Source

fn token_type(&self) -> i32

Source

fn channel(&self) -> i32

Source

fn start(&self) -> usize

Source

fn stop(&self) -> usize

Source

fn token_index(&self) -> isize

Source

fn line(&self) -> usize

Source

fn column(&self) -> usize

Source

fn text(&self) -> Option<&str>

Source

fn source_name(&self) -> &str

Provided Methods§

Implementors§