Struct rustlr::lexer_interface::charlexer
source · [−]Expand description
This struct is deprecated by charscanner. It is compatible with Lexer and Lextoken, which are also deprecated.
Fields
modify: fn(_: char) -> String
function to modify char returned by nextsym, can be changed.
Both charlexer::make and charlexer::new sets this function
initially to |x|{x.to_string()}
. For example, some characters such
as ‘{’ and ‘}’ cannot be used as terminal symbols of a grammar and must
be translated into something like “LBRACE” and “RBRACE”
Implementations
Trait Implementations
sourceimpl<'t, AT: Default> Lexer<AT> for charlexer<'t>
impl<'t, AT: Default> Lexer<AT> for charlexer<'t>
sourcefn current_line(&self) -> &str
fn current_line(&self) -> &str
returns slice of underlying data using std::str::Chars::as_str
Auto Trait Implementations
impl<'t> RefUnwindSafe for charlexer<'t>
impl<'t> Send for charlexer<'t>
impl<'t> Sync for charlexer<'t>
impl<'t> Unpin for charlexer<'t>
impl<'t> UnwindSafe for charlexer<'t>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more