pub struct Lexer { /* private fields */ }Implementations§
Source§impl Lexer
impl Lexer
pub fn new(block: Vec<Block>, init: bool) -> Self
pub fn eob(&self) -> bool
pub fn text(&self) -> String
pub fn pos(&self) -> usize
pub fn advance(&mut self) -> bool
pub fn match_(&mut self, regexp: &str) -> Option<String>
pub fn keyword(&mut self, regexp: &str) -> Option<String>
pub fn error(&self, msg: &str) -> Result<()>
pub fn eol(&mut self) -> bool
pub fn expect_eol(&mut self) -> Result<()>
pub fn expect_noblock(&mut self, stmt: &str) -> Result<()>
pub fn expect_block(&mut self, stmt: &str) -> Result<()>
pub fn subblock_lexer(&mut self, init: bool) -> Lexer
pub fn string(&mut self) -> Option<String>
pub fn integer(&mut self) -> Option<String>
pub fn float(&mut self) -> Option<String>
pub fn word(&mut self) -> Option<String>
pub fn audio_filename(&mut self) -> Option<String>
pub fn stop_arguments(&mut self) -> (Option<String>, Option<f32>)
pub fn name(&mut self) -> Option<String>
pub fn simple_expression(&mut self) -> Result<Option<String>>
pub fn require(&mut self, thing: &str) -> Result<String>
pub fn rest(&mut self) -> String
pub fn get_location(&self) -> usize
pub fn checkpoint(&self) -> LexerState
pub fn revert(&mut self, state: LexerState)
Auto Trait Implementations§
impl Freeze for Lexer
impl RefUnwindSafe for Lexer
impl Send for Lexer
impl Sync for Lexer
impl Unpin for Lexer
impl UnwindSafe for Lexer
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