pub struct Parser<TT>where
TT: TokenType,{ /* private fields */ }Implementations§
Source§impl<TT> Parser<TT>where
TT: TokenType,
impl<TT> Parser<TT>where
TT: TokenType,
pub fn new(rules: Vec<BNFRule<TT>>, start_rule_index: RuleIndex) -> Self
pub fn parse<T>(
&self,
tokens: &Vec<T>,
) -> ParserResult<Result<Vec<MatchRecord>, ParseError>>where
T: Token<TT>,
pub fn parse_to_buffer<T>(
&self,
tokens: &Vec<T>,
match_records: &mut Vec<MatchRecord>,
) -> ParserResult<Result<(), ParseError>>where
T: Token<TT>,
Trait Implementations§
Auto Trait Implementations§
impl<TT> Freeze for Parser<TT>
impl<TT> RefUnwindSafe for Parser<TT>where
TT: RefUnwindSafe,
impl<TT> Send for Parser<TT>where
TT: Send,
impl<TT> Sync for Parser<TT>where
TT: Sync,
impl<TT> Unpin for Parser<TT>where
TT: Unpin,
impl<TT> UnwindSafe for Parser<TT>where
TT: UnwindSafe,
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