pub struct LexerBuilder { /* private fields */ }
Implementations§
Source§impl LexerBuilder
impl LexerBuilder
pub fn new() -> Self
pub fn set_skip_comments(self, skip_comments: bool) -> Self
pub fn add_rule<R>(self, rule: R) -> Selfwhere
R: LexerRule + 'static,
pub fn insert_rule<R>( self, index: usize, rule: impl LexerRule + 'static, ) -> Self
pub fn extend_rules( self, rules: impl Iterator<Item = impl LexerRule + 'static>, ) -> Self
pub fn build_once<S>(self, source: S) -> Lexer<S> ⓘ
pub fn build<S>(&self, source: S) -> Lexer<S> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LexerBuilder
impl !RefUnwindSafe for LexerBuilder
impl !Send for LexerBuilder
impl !Sync for LexerBuilder
impl Unpin for LexerBuilder
impl !UnwindSafe for LexerBuilder
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