pub struct Lexer<'a> { /* private fields */ }Expand description
Lexer for LNMP text format
Implementations§
Source§impl<'a> Lexer<'a>
impl<'a> Lexer<'a>
Sourcepub fn new_owned(input: String) -> Self
pub fn new_owned(input: String) -> Self
Creates a new lexer owning its input (used after sanitization)
Sourcepub fn new_owned_with_original(
sanitized: String,
original: String,
span_map: SpanMap,
) -> Self
pub fn new_owned_with_original( sanitized: String, original: String, span_map: SpanMap, ) -> Self
Creates a new lexer owning sanitized input and carrying original for span mapping.
Sourcepub fn position_original(&self) -> (usize, usize)
pub fn position_original(&self) -> (usize, usize)
Returns position mapped to original input if available (lenient mode).
Auto Trait Implementations§
impl<'a> Freeze for Lexer<'a>
impl<'a> RefUnwindSafe for Lexer<'a>
impl<'a> Send for Lexer<'a>
impl<'a> Sync for Lexer<'a>
impl<'a> Unpin for Lexer<'a>
impl<'a> UnwindSafe for Lexer<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more