pub struct TermParser { /* private fields */ }Implementations§
Source§impl TermParser
impl TermParser
pub fn new() -> TermParser
pub fn parse<'input, 'ast, 'err, 'wcard, __TOKEN: __ToTriple<'input, 'ast, 'err, 'wcard>, __TOKENS: IntoIterator<Item = __TOKEN>>( &self, alloc: &'ast AstAlloc, src_id: FileId, errors: &'err mut Vec<ErrorRecovery<usize, Token<'input>, ParseOrLexError>>, next_wildcard_id: &'wcard mut usize, __tokens0: __TOKENS, ) -> Result<Ast<'ast>, ParseError<usize, Token<'input>, ParseOrLexError>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TermParser
impl RefUnwindSafe for TermParser
impl Send for TermParser
impl Sync for TermParser
impl Unpin for TermParser
impl UnsafeUnpin for TermParser
impl UnwindSafe for TermParser
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<'ast, T, P> ErrorTolerantParser<'ast, T> for Pwhere
P: LalrpopParser<'ast, T>,
impl<'ast, T, P> ErrorTolerantParser<'ast, T> for Pwhere
P: LalrpopParser<'ast, T>,
Source§fn parse_tolerant<'input>(
&self,
alloc: &'ast AstAlloc,
file_id: FileId,
lexer: impl Iterator<Item = Result<(usize, Token<'input>, usize), LexicalError>>,
) -> Result<(T, ParseErrors), ParseError>
fn parse_tolerant<'input>( &self, alloc: &'ast AstAlloc, file_id: FileId, lexer: impl Iterator<Item = Result<(usize, Token<'input>, usize), LexicalError>>, ) -> Result<(T, ParseErrors), ParseError>
Parse a value from a lexer with the given
file_id in an error-tolerant way. This methods
can still fail for non-recoverable errors.Source§fn parse_strict<'input>(
&self,
alloc: &'ast AstAlloc,
file_id: FileId,
lexer: impl Iterator<Item = Result<(usize, Token<'input>, usize), LexicalError>>,
) -> Result<T, ParseErrors>
fn parse_strict<'input>( &self, alloc: &'ast AstAlloc, file_id: FileId, lexer: impl Iterator<Item = Result<(usize, Token<'input>, usize), LexicalError>>, ) -> Result<T, ParseErrors>
Parse a value from a lexer with the given
file_id, failing at the first encountered
error.Source§impl<'ast, P> FullyErrorTolerantParser<'ast, Ast<'ast>> for Pwhere
P: ErrorTolerantParser<'ast, Ast<'ast>>,
impl<'ast, P> FullyErrorTolerantParser<'ast, Ast<'ast>> for Pwhere
P: ErrorTolerantParser<'ast, Ast<'ast>>,
Source§fn parse_fully_tolerant<'input>(
&self,
alloc: &'ast AstAlloc,
file_id: FileId,
lexer: impl Iterator<Item = Result<(usize, Token<'input>, usize), LexicalError>>,
full_span: RawSpan,
) -> (Ast<'ast>, ParseErrors)
fn parse_fully_tolerant<'input>( &self, alloc: &'ast AstAlloc, file_id: FileId, lexer: impl Iterator<Item = Result<(usize, Token<'input>, usize), LexicalError>>, full_span: RawSpan, ) -> (Ast<'ast>, ParseErrors)
Parse a value from a lexer with the given
file_id in an error-tolerant way. Read moreSource§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