struct Parser<'a> {
lines: Lines<'a>,
cur_line: &'a str,
cur_pos: usize,
line_num: u64,
cur_line_chars: Vec<&'a str>,
}Available on crate feature
yuris only.Fields§
§lines: Lines<'a>§cur_line: &'a str§cur_pos: usize§line_num: u64§cur_line_chars: Vec<&'a str>Implementations§
Source§impl<'a> Parser<'a>
impl<'a> Parser<'a>
fn new(data: &'a str) -> Self
fn error(&self, msg: impl Display) -> Error
fn parse(self) -> Result<Vec<Line>>
fn add_next_line(&mut self) -> Result<()>
fn parse_line(&mut self) -> Result<Line>
fn parse_command(&mut self) -> Result<CommandNode>
fn parse_name(&mut self) -> Result<NameNode>
fn peek_char(&self) -> Option<&'a str>
fn peek_char_offset(&self, offset: isize) -> Option<&'a str>
fn next_char(&mut self) -> Option<&'a str>
fn next_char_with_line(&mut self) -> Option<&'a str>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Parser<'a>
impl<'a> RefUnwindSafe for Parser<'a>
impl<'a> Send for Parser<'a>
impl<'a> Sync for Parser<'a>
impl<'a> Unpin for Parser<'a>
impl<'a> UnwindSafe for Parser<'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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more