pub struct PaddedLeft<P, O, L, Ctx, Lang: ?Sized = (), Cmpl = Complete> { /* private fields */ }Expand description
A parser that automatically consumes trivia (whitespace, comments) before parsing only.
This is a variant of Padded that only skips leading trivia. Trailing trivia
after the parsed token is preserved and left for subsequent parsers.
Use this when:
- Line-oriented syntax: Newlines after tokens are significant
- Indentation-sensitive languages: Trailing whitespace affects layout
- Asymmetric formatting: Only left padding should be normalized
§Type Parameters
P: The inner parser to wrap with left paddingO: Output type of the inner parserL: Lexer typeCtx: Parse contextLang: Language marker type (default())
§Examples
§Line-Oriented Parsing
ⓘ
use tokora::parse::ParseInput;
// Parse statement but preserve trailing newline
let parser = parse_statement().padded_left();
// Input: " print(x)\n"
// ^^ ^ trailing newline preserved
// leading whitespace skipped§Preserving Line Breaks
ⓘ
// Parse identifier, allowing leading space but not trailing
let parser = parse_identifier().padded_left();
// Input: " foo" → Ok("foo"), remaining: ""
// Input: " foo " → Ok("foo"), remaining: " "
// Input: " foo\n" → Ok("foo"), remaining: "\n"§See Also
Padded- Skip trivia on both sides (most common)PaddedRight- Skip trailing trivia onlyToken::is_trivia()- Determines trivia
Trait Implementations§
Source§impl<P: Clone, O: Clone, L: Clone, Ctx: Clone, Lang: Clone + ?Sized, Cmpl: Clone> Clone for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>
impl<P: Clone, O: Clone, L: Clone, Ctx: Clone, Lang: Clone + ?Sized, Cmpl: Clone> Clone for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>
impl<P: Copy, O: Copy, L: Copy, Ctx: Copy, Lang: Copy + ?Sized, Cmpl: Copy> Copy for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>
Source§impl<P: Debug, O: Debug, L: Debug, Ctx: Debug, Lang: Debug + ?Sized, Cmpl: Debug> Debug for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>
impl<P: Debug, O: Debug, L: Debug, Ctx: Debug, Lang: Debug + ?Sized, Cmpl: Debug> Debug for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>
impl<P: Eq, O: Eq, L: Eq, Ctx: Eq, Lang: Eq + ?Sized, Cmpl: Eq> Eq for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>
Source§impl<P: Hash, O: Hash, L: Hash, Ctx: Hash, Lang: Hash + ?Sized, Cmpl: Hash> Hash for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>
impl<P: Hash, O: Hash, L: Hash, Ctx: Hash, Lang: Hash + ?Sized, Cmpl: Hash> Hash for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>
Source§impl<'inp, P, L, O, Ctx, Lang, Cmpl> ParseInput<'inp, L, O, Ctx, Lang, Cmpl> for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>where
P: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Lang: ?Sized,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
impl<'inp, P, L, O, Ctx, Lang, Cmpl> ParseInput<'inp, L, O, Ctx, Lang, Cmpl> for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>where
P: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Lang: ?Sized,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
Source§fn parse_input(
&mut self,
inp: &mut InputRef<'inp, '_, L, Ctx, Lang, Cmpl>,
) -> Result<O, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>where
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
fn parse_input(
&mut self,
inp: &mut InputRef<'inp, '_, L, Ctx, Lang, Cmpl>,
) -> Result<O, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>where
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Try to parse from the given input.
Source§fn delimited<D>(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> DelimitedOf<'inp, D, L, Ctx, Lang, O>where
Self: Sized,
D: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
fn delimited<D>(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> DelimitedOf<'inp, D, L, Ctx, Lang, O>where
Self: Sized,
D: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
Wraps this parser in a committed delimiter pair. Read more
Source§fn delimited_by_parens(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> DelimitedOf<'inp, Paren<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Paren<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
fn delimited_by_parens(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> DelimitedOf<'inp, Paren<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Paren<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
Wraps this parser in a committed
Paren delimiter pair by delegating to ParseInput::delimited.Source§fn delimited_by_braces(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> DelimitedOf<'inp, Brace<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Brace<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
fn delimited_by_braces(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> DelimitedOf<'inp, Brace<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Brace<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
Wraps this parser in a committed
Brace delimiter pair by delegating to ParseInput::delimited.Source§fn delimited_by_brackets(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> DelimitedOf<'inp, Bracket<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Bracket<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
fn delimited_by_brackets(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> DelimitedOf<'inp, Bracket<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Bracket<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
Wraps this parser in a committed
Bracket delimiter pair by delegating to ParseInput::delimited.Source§fn delimited_by_angles(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> DelimitedOf<'inp, Angle<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Angle<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
fn delimited_by_angles(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> DelimitedOf<'inp, Angle<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Angle<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
Wraps this parser in a committed
Angle delimiter pair by delegating to ParseInput::delimited.Source§fn try_delimited<D>(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> TryDelimitedOf<'inp, D, L, Ctx, Lang, O>where
Self: Sized,
D: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
fn try_delimited<D>(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> TryDelimitedOf<'inp, D, L, Ctx, Lang, O>where
Self: Sized,
D: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
Wraps this parser in an attempted delimiter pair. Read more
Source§fn try_delimited_by_parens(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> TryDelimitedOf<'inp, Paren<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Paren<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
fn try_delimited_by_parens(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> TryDelimitedOf<'inp, Paren<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Paren<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
Wraps this parser in an attempted
Paren delimiter pair by delegating to ParseInput::try_delimited. Read moreSource§fn try_delimited_by_braces(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> TryDelimitedOf<'inp, Brace<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Brace<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
fn try_delimited_by_braces(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> TryDelimitedOf<'inp, Brace<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Brace<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
Wraps this parser in an attempted
Brace delimiter pair by delegating to ParseInput::try_delimited. Read moreSource§fn try_delimited_by_brackets(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> TryDelimitedOf<'inp, Bracket<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Bracket<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
fn try_delimited_by_brackets(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> TryDelimitedOf<'inp, Bracket<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Bracket<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
Wraps this parser in an attempted
Bracket delimiter pair by delegating to ParseInput::try_delimited. Read moreSource§fn try_delimited_by_angles(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> TryDelimitedOf<'inp, Angle<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Angle<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
fn try_delimited_by_angles(
self,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang, Cmpl>) -> TryDelimitedOf<'inp, Angle<(), (), Lang>, L, Ctx, Lang, O>where
Self: Sized,
Angle<(), (), Lang>: TypedDelimiter<'inp, L, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Cmpl: SurfaceIncomplete<'inp, L, Ctx, Lang>,
Wraps this parser in an attempted
Angle delimiter pair by delegating to ParseInput::try_delimited. Read moreSource§fn spanned(self) -> With<PhantomSpan, Self, Cmpl>
fn spanned(self) -> With<PhantomSpan, Self, Cmpl>
Wraps the output of this parser in a
Spanned with the span of the parsed input. Read moreSource§fn sliced(self) -> With<PhantomSliced, Self, Cmpl>
fn sliced(self) -> With<PhantomSliced, Self, Cmpl>
Wraps the output of this parser in a
Sliced with the source slice of the parsed input. Read moreSource§fn located(self) -> With<PhantomLocated, Self, Cmpl>
fn located(self) -> With<PhantomLocated, Self, Cmpl>
Wraps the output of this parser in a
Located with the span and source slice of the parsed input. Read moreSource§fn spanned_trimmed(self) -> With<Trimmed<PhantomSpan>, Self, Cmpl>
fn spanned_trimmed(self) -> With<Trimmed<PhantomSpan>, Self, Cmpl>
Wraps the output of this parser in a
Spanned with the trimmed span of the parsed
input: from the start of the first token it consumes to the committed position after it. Read moreSource§fn sliced_trimmed(self) -> With<Trimmed<PhantomSliced>, Self, Cmpl>
fn sliced_trimmed(self) -> With<Trimmed<PhantomSliced>, Self, Cmpl>
Source§fn located_trimmed(self) -> With<Trimmed<PhantomLocated>, Self, Cmpl>
fn located_trimmed(self) -> With<Trimmed<PhantomLocated>, Self, Cmpl>
Source§fn ignored(self) -> Ignore<Self, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ignore<Self, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, (), Ctx, Lang, Cmpl>,
fn ignored(self) -> Ignore<Self, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ignore<Self, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, (), Ctx, Lang, Cmpl>,
Ignores the output of this parser.
Source§fn by_ref(&mut self) -> &mut ByRef<Self>
fn by_ref(&mut self) -> &mut ByRef<Self>
Creates a parser over a mutable reference to this parser.
Source§fn fold_while<Condition, Init, Acc, W>(
self,
pred: Condition,
init: Init,
acc: Acc,
) -> FoldWhile<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
FoldWhile<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn fold_while<Condition, Init, Acc, W>(
self,
pred: Condition,
init: Init,
acc: Acc,
) -> FoldWhile<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
FoldWhile<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Available on crate feature
fold only.Creates a
FoldWhile combinator that accumulates results while a condition is met.Source§fn try_fold_while<Condition, Init, Acc, W>(
self,
pred: Condition,
init: Init,
acc: Acc,
) -> TryFoldWhile<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Init: FnMut() -> O,
Acc: FnMut(O, O) -> Result<O, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
TryFoldWhile<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn try_fold_while<Condition, Init, Acc, W>(
self,
pred: Condition,
init: Init,
acc: Acc,
) -> TryFoldWhile<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Init: FnMut() -> O,
Acc: FnMut(O, O) -> Result<O, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
TryFoldWhile<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Available on crate feature
fold only.Creates a
TryFoldWhile combinator that accumulates results while a condition is met. Read moreSource§fn try_fold_while_with<Condition, Init, Acc, W>(
self,
pred: Condition,
init: Init,
acc: Acc,
) -> TryFoldWhileWith<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Init: FnMut() -> O,
Acc: FnMut(O, O, ParseState<'_, 'inp, '_, L, Ctx, Lang, Cmpl>) -> Result<O, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
TryFoldWhileWith<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn try_fold_while_with<Condition, Init, Acc, W>(
self,
pred: Condition,
init: Init,
acc: Acc,
) -> TryFoldWhileWith<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Init: FnMut() -> O,
Acc: FnMut(O, O, ParseState<'_, 'inp, '_, L, Ctx, Lang, Cmpl>) -> Result<O, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
TryFoldWhileWith<Self, Condition, Init, Acc, O, W, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Available on crate feature
fold only.Creates a
TryFoldWhileWith combinator that accumulates results while a condition is met,
with access to parsing state.Source§fn rfold_while<Condition, Init, Acc, W>(
self,
condition: Condition,
init: Init,
acc: Acc,
) -> RFoldWhile<Self, Condition, Init, Acc, L, O, W, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Init: FnMut() -> O,
Acc: FnMut(O, O) -> O,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
RFoldWhile<Self, Condition, Init, Acc, L, O, W, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn rfold_while<Condition, Init, Acc, W>(
self,
condition: Condition,
init: Init,
acc: Acc,
) -> RFoldWhile<Self, Condition, Init, Acc, L, O, W, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Init: FnMut() -> O,
Acc: FnMut(O, O) -> O,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
RFoldWhile<Self, Condition, Init, Acc, L, O, W, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Available on crate feature
fold and (crate features alloc or std) only.Creates a
RFoldWhile combinator that applies this parser repeatedly,
while a condition is met, and folds results in reverse order. Read moreSource§fn repeated_while<Condition, W>(
self,
condition: Condition,
) -> RepeatedWhile<Self, Condition, O, W, L, Ctx, Lang, Cmpl>
fn repeated_while<Condition, W>( self, condition: Condition, ) -> RepeatedWhile<Self, Condition, O, W, L, Ctx, Lang, Cmpl>
Available on crate feature
many only.Creates a
RepeatedWhile combinator that applies this parser repeatedly, where you
provide the lookahead logic. Read moreSource§fn separated_while<Sep, Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Sep, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
Sep: Punctuator<'inp, L, Lang>,
W: Window,
fn separated_while<Sep, Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Sep, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
Sep: Punctuator<'inp, L, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator that parses separated elements, where you
provide the lookahead logic. Read moreSource§fn separated_by_comma_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Comma<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_comma_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Comma<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the comma separator and applies this parser repeatedly. Read moreSource§fn separated_by_semicolon_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Semicolon<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_semicolon_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Semicolon<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the semicolon separator and applies this parser repeatedly. Read moreSource§fn separated_by_dot_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Dot<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_dot_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Dot<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the dot separator and applies this parser repeatedly. Read moreSource§fn separated_by_colon_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Colon<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_colon_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Colon<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the colon separator and applies this parser repeatedly. Read moreSource§fn separated_by_pipe_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Pipe<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_pipe_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Pipe<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the pipe separator and applies this parser repeatedly. Read moreSource§fn separated_by_ampersand_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Ampersand<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_ampersand_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Ampersand<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the ampersand separator and applies this parser repeatedly. Read moreSource§fn separated_by_hyphen_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Hyphen<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_hyphen_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Hyphen<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the hyphen separator and applies this parser repeatedly. Read moreSource§fn separated_by_underscore_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Underscore<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_underscore_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Underscore<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the underscore separator and applies this parser repeatedly. Read moreSource§fn separated_by_double_colon_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, DoubleColon<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_double_colon_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, DoubleColon<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the double_colon separator and applies this parser repeatedly. Read moreSource§fn separated_by_arrow_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Arrow<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_arrow_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Arrow<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the arrow separator and applies this parser repeatedly. Read moreSource§fn separated_by_fat_arrow_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, FatArrow<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_fat_arrow_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, FatArrow<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the fat_arrow separator and applies this parser repeatedly. Read moreSource§fn separated_by_tilde_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Tilde<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_tilde_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Tilde<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the tilde separator and applies this parser repeatedly. Read moreSource§fn separated_by_slash_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Slash<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_slash_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Slash<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the slash separator and applies this parser repeatedly. Read moreSource§fn separated_by_backslash_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Backslash<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_backslash_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Backslash<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the backslash separator and applies this parser repeatedly. Read moreSource§fn separated_by_percent_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Percent<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_percent_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Percent<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the percent separator and applies this parser repeatedly. Read moreSource§fn separated_by_dollar_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Dollar<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_dollar_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Dollar<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the dollar separator and applies this parser repeatedly. Read moreSource§fn separated_by_hash_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Hash<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_hash_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, Hash<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the hash separator and applies this parser repeatedly. Read moreSource§fn separated_by_at_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, At<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
fn separated_by_at_while<Condition, W>(
self,
condition: Condition,
) -> SeparatedWhile<Self, At<(), (), Lang>, Condition, O, W, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
L::Token: PunctuatorToken<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Condition: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
Available on crate feature
many only.Creates a
SeparatedWhile combinator which separates elements by the at separator and applies this parser repeatedly. Read moreSource§fn labelled(self, name: &'static str) -> Labelled<Self>where
Self: Sized,
fn labelled(self, name: &'static str) -> Labelled<Self>where
Self: Sized,
Method form of the free
labelled.Source§fn traced(self, name: &'static str) -> Traced<Self>where
Self: Sized,
fn traced(self, name: &'static str) -> Traced<Self>where
Self: Sized,
Available on crate feature
trace only.Method form of the free
traced.Source§fn list_until<Until>(
self,
until: Until,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang>) -> ListOf<'inp, L, Ctx, Lang, O>where
Self: Sized + ParseInput<'inp, L, O, Ctx, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Until: FnMut(&L::Token) -> bool,
fn list_until<Until>(
self,
until: Until,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang>) -> ListOf<'inp, L, Ctx, Lang, O>where
Self: Sized + ParseInput<'inp, L, O, Ctx, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Until: FnMut(&L::Token) -> bool,
Available on crate feature
many and (crate features alloc or std) only.Source§fn separated1_by<Sep, Peek>(
self,
peek: Peek,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang>) -> Separated1Of<'inp, L, Ctx, Lang, O>where
Self: Sized + ParseInput<'inp, L, O, Ctx, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Sep: Punctuator<'inp, L, Lang>,
Peek: FnMut(&L::Token) -> bool,
fn separated1_by<Sep, Peek>(
self,
peek: Peek,
) -> impl for<'c> FnMut(&mut InputRef<'inp, 'c, L, Ctx, Lang>) -> Separated1Of<'inp, L, Ctx, Lang, O>where
Self: Sized + ParseInput<'inp, L, O, Ctx, Lang>,
L: Lexer<'inp>,
Ctx: ComposableParseContext<'inp, L, Lang>,
Sep: Punctuator<'inp, L, Lang>,
Peek: FnMut(&L::Token) -> bool,
Available on crate feature
many and (crate features alloc or std) only.Method form of the free
separated1 — the
committed-first “light” list shape, fluent. Read moreSource§fn peek_then<C, W>(self, condition: C) -> PeekThen<Self, C, L::Token, W, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
C: FnMut(Peeked<'_, 'inp, L, W>, EmitterView<'_, 'inp, L, Ctx::Emitter, Lang>) -> Result<(), <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
W: Window,
PeekThen<Self, C, L::Token, W, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn peek_then<C, W>(self, condition: C) -> PeekThen<Self, C, L::Token, W, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
C: FnMut(Peeked<'_, 'inp, L, W>, EmitterView<'_, 'inp, L, Ctx::Emitter, Lang>) -> Result<(), <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
W: Window,
PeekThen<Self, C, L::Token, W, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Available on crate feature
peek only.Creates a
PeekThen combinator that peeks at most N tokens first from the input before parsing. Read moreSource§fn peek_then_try<C, W>(
self,
condition: C,
) -> PeekThen<Self, C, L::Token, W, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
C: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
PeekThen<Self, C, L::Token, W, Cmpl>: TryParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn peek_then_try<C, W>(
self,
condition: C,
) -> PeekThen<Self, C, L::Token, W, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
C: Decision<'inp, L, Ctx::Emitter, W, Lang>,
W: Window,
PeekThen<Self, C, L::Token, W, Cmpl>: TryParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Available on crate feature
peek only.Creates a
PeekThen combinator that peeks at most N tokens first from the input before parsing. Read moreSource§fn peek_then_head<C>(
self,
condition: C,
) -> PeekThen<Self, impl FnMut(Peeked<'_, 'inp, L, U1>, EmitterView<'_, 'inp, L, Ctx::Emitter, Lang>) -> Result<(), <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>, L::Token, U1, Cmpl>
fn peek_then_head<C>( self, condition: C, ) -> PeekThen<Self, impl FnMut(Peeked<'_, 'inp, L, U1>, EmitterView<'_, 'inp, L, Ctx::Emitter, Lang>) -> Result<(), <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>, L::Token, U1, Cmpl>
Available on crate feature
peek only.Source§fn map<U, F>(self, f: F) -> Map<Self, F, L, Ctx, O, U, Lang, Cmpl>where
Self: Sized,
F: FnMut(O) -> U,
L: Lexer<'inp>,
Map<Self, F, L, Ctx, O, U, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
fn map<U, F>(self, f: F) -> Map<Self, F, L, Ctx, O, U, Lang, Cmpl>where
Self: Sized,
F: FnMut(O) -> U,
L: Lexer<'inp>,
Map<Self, F, L, Ctx, O, U, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
Available on crate feature
map only.Map the output of this parser using the given function.
Source§fn map_with<U, F>(self, f: F) -> MapWith<Self, F, L, Ctx, O, U, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
F: FnMut(O, ParseState<'_, 'inp, '_, L, Ctx, Lang, Cmpl>) -> U,
MapWith<Self, F, L, Ctx, O, U, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
fn map_with<U, F>(self, f: F) -> MapWith<Self, F, L, Ctx, O, U, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
F: FnMut(O, ParseState<'_, 'inp, '_, L, Ctx, Lang, Cmpl>) -> U,
MapWith<Self, F, L, Ctx, O, U, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
Available on crate feature
map only.Map the output of this parser using the given function.
Source§fn filter<F>(self, validator: F) -> Filter<Self, F, O, L, Ctx, Lang, Cmpl>
fn filter<F>(self, validator: F) -> Filter<Self, F, O, L, Ctx, Lang, Cmpl>
Available on crate feature
filter only.Filter the output of this parser using a validation function.
Source§fn filter_with<F>(
self,
validator: F,
) -> FilterWith<Self, F, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
F: FnMut(&O, ParseState<'_, 'inp, '_, L, Ctx, Lang, Cmpl>) -> Result<(), <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Ctx: ParseContext<'inp, L, Lang>,
FilterWith<Self, F, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn filter_with<F>(
self,
validator: F,
) -> FilterWith<Self, F, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
F: FnMut(&O, ParseState<'_, 'inp, '_, L, Ctx, Lang, Cmpl>) -> Result<(), <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Ctx: ParseContext<'inp, L, Lang>,
FilterWith<Self, F, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Available on crate feature
filter only.Filter the output of this parser using a validation function.
Source§fn filter_map<U, F>(
self,
mapper: F,
) -> FilterMap<Self, F, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
F: FnMut(O) -> Result<U, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Ctx: ParseContext<'inp, L, Lang>,
FilterMap<Self, F, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
fn filter_map<U, F>(
self,
mapper: F,
) -> FilterMap<Self, F, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
F: FnMut(O) -> Result<U, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Ctx: ParseContext<'inp, L, Lang>,
FilterMap<Self, F, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
Available on crate feature
filter only.Filter and map the output of this parser using a validation/transformation function. Read more
Source§fn filter_map_with<U, F>(
self,
mapper: F,
) -> FilterMapWith<Self, F, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
F: FnMut(O, ParseState<'_, 'inp, '_, L, Ctx, Lang, Cmpl>) -> Result<U, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Ctx: ParseContext<'inp, L, Lang>,
FilterMapWith<Self, F, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
fn filter_map_with<U, F>(
self,
mapper: F,
) -> FilterMapWith<Self, F, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
F: FnMut(O, ParseState<'_, 'inp, '_, L, Ctx, Lang, Cmpl>) -> Result<U, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Ctx: ParseContext<'inp, L, Lang>,
FilterMapWith<Self, F, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
Available on crate feature
filter only.Filter and map the output of this parser using a validation/transformation function. Read more
Source§fn validate<F>(self, validator: F) -> Validate<Self, F, O, L, Ctx, Lang, Cmpl>
fn validate<F>(self, validator: F) -> Validate<Self, F, O, L, Ctx, Lang, Cmpl>
Available on crate feature
validate only.Validate the output of this parser with full location context.
Source§fn validate_with<F>(
self,
validator: F,
) -> ValidateWith<Self, F, O, L, Ctx, Lang, Cmpl>
fn validate_with<F>( self, validator: F, ) -> ValidateWith<Self, F, O, L, Ctx, Lang, Cmpl>
Available on crate feature
validate only.Validate the output of this parser with full location context.
Source§fn then_ignore<G, U>(
self,
second: G,
) -> ThenIgnore<Self, G, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
G: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
Ctx: ParseContext<'inp, L, Lang>,
ThenIgnore<Self, G, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn then_ignore<G, U>(
self,
second: G,
) -> ThenIgnore<Self, G, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
G: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
Ctx: ParseContext<'inp, L, Lang>,
ThenIgnore<Self, G, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Available on crate feature
then only.Sequence this parser with another, ignoring the output of the second.
Source§fn then_value<F, U>(
self,
value: F,
) -> ThenValue<Self, F, O, U, L, Ctx, Lang, Cmpl>
fn then_value<F, U>( self, value: F, ) -> ThenValue<Self, F, O, U, L, Ctx, Lang, Cmpl>
Available on crate feature
then only.Sequence this parser with a fixed value, ignoring the output of the first.
Source§fn and_then<T, U>(self, then: T) -> AndThen<Self, T, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
T: FnMut(O) -> Result<U, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
AndThen<Self, T, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
fn and_then<T, U>(self, then: T) -> AndThen<Self, T, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
T: FnMut(O) -> Result<U, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
AndThen<Self, T, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
Available on crate feature
then only.Sequence this parser with another, using the first result to determine the second parser.
Source§fn and_then_with<T, U>(
self,
then: T,
) -> AndThenWith<Self, T, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
T: FnMut(O, ParseState<'_, 'inp, '_, L, Ctx, Lang, Cmpl>) -> Result<U, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Ctx: ParseContext<'inp, L, Lang>,
L: Lexer<'inp>,
AndThenWith<Self, T, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
fn and_then_with<T, U>(
self,
then: T,
) -> AndThenWith<Self, T, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
T: FnMut(O, ParseState<'_, 'inp, '_, L, Ctx, Lang, Cmpl>) -> Result<U, <Ctx::Emitter as Emitter<'inp, L, Lang>>::Error>,
Ctx: ParseContext<'inp, L, Lang>,
L: Lexer<'inp>,
AndThenWith<Self, T, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
Available on crate feature
then only.Sequence this parser with another, using the first result to determine the second parser.
Source§fn then<T, U>(self, then: T) -> Then<Self, T, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
T: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
Ctx: ParseContext<'inp, L, Lang>,
Then<Self, T, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, (O, U), Ctx, Lang, Cmpl>,
fn then<T, U>(self, then: T) -> Then<Self, T, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
T: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
Ctx: ParseContext<'inp, L, Lang>,
Then<Self, T, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, (O, U), Ctx, Lang, Cmpl>,
Available on crate feature
then only.Sequence this parser with another, keeping both outputs.
Source§fn ignore_then<G, U>(
self,
second: G,
) -> IgnoreThen<Self, G, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
G: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
IgnoreThen<Self, G, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
fn ignore_then<G, U>(
self,
second: G,
) -> IgnoreThen<Self, G, O, U, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
G: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
IgnoreThen<Self, G, O, U, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, U, Ctx, Lang, Cmpl>,
Available on crate feature
then only.Sequence this parser with another, ignoring the output of the first.
Source§fn recover<R>(self, recovery: R) -> Recover<Self, R, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
R: RecoverInput<'inp, L, O, Ctx, Lang, Cmpl>,
Ctx: ParseContext<'inp, L, Lang>,
Recover<Self, R, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn recover<R>(self, recovery: R) -> Recover<Self, R, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
R: RecoverInput<'inp, L, O, Ctx, Lang, Cmpl>,
Ctx: ParseContext<'inp, L, Lang>,
Recover<Self, R, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Recover from errors by trying an alternative parser with backtracking. Read more
Source§fn inplace_recover<R>(
self,
recovery: R,
) -> InplaceRecover<Self, R, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
R: InplaceRecoverInput<'inp, L, O, Ctx, Lang, Cmpl>,
Ctx: ParseContext<'inp, L, Lang>,
InplaceRecover<Self, R, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn inplace_recover<R>(
self,
recovery: R,
) -> InplaceRecover<Self, R, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
R: InplaceRecoverInput<'inp, L, O, Ctx, Lang, Cmpl>,
Ctx: ParseContext<'inp, L, Lang>,
InplaceRecover<Self, R, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Recover from errors without backtracking, continuing from the error position. Read more
Source§fn skip_then_retry<D, F>(
self,
classifier: D,
pred: F,
) -> SkipThenRetry<Self, D, F, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
D: DelimClass<<L::Token as Token<'inp>>::Kind>,
F: FnMut(Spanned<&L::Token, &L::Span>) -> bool,
Ctx: ParseContext<'inp, L, Lang>,
SkipThenRetry<Self, D, F, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn skip_then_retry<D, F>(
self,
classifier: D,
pred: F,
) -> SkipThenRetry<Self, D, F, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
D: DelimClass<<L::Token as Token<'inp>>::Kind>,
F: FnMut(Spanned<&L::Token, &L::Span>) -> bool,
Ctx: ParseContext<'inp, L, Lang>,
SkipThenRetry<Self, D, F, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Recover from errors by skipping — nesting-aware — to a synchronization point and
retrying this parser. Read more
Source§fn padded(self) -> Padded<Self, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Padded<Self, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn padded(self) -> Padded<Self, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
Padded<Self, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Creates a parser that accepts any token with optional padding.
Source§fn padded_left(self) -> PaddedLeft<Self, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
PaddedLeft<Self, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn padded_left(self) -> PaddedLeft<Self, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
PaddedLeft<Self, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Creates a parser that accepts any token with optional padding.
Source§fn padded_right(self) -> PaddedRight<Self, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
PaddedRight<Self, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
fn padded_right(self) -> PaddedRight<Self, O, L, Ctx, Lang, Cmpl>where
Self: Sized,
L: Lexer<'inp>,
PaddedRight<Self, O, L, Ctx, Lang, Cmpl>: ParseInput<'inp, L, O, Ctx, Lang, Cmpl>,
Creates a parser that accepts any token with optional padding.
Source§impl<P: PartialEq, O: PartialEq, L: PartialEq, Ctx: PartialEq, Lang: PartialEq + ?Sized, Cmpl: PartialEq> PartialEq for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>
impl<P: PartialEq, O: PartialEq, L: PartialEq, Ctx: PartialEq, Lang: PartialEq + ?Sized, Cmpl: PartialEq> PartialEq for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>
impl<P: PartialEq, O: PartialEq, L: PartialEq, Ctx: PartialEq, Lang: PartialEq + ?Sized, Cmpl: PartialEq> StructuralPartialEq for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>
Auto Trait Implementations§
impl<P, O, L, Ctx, Lang, Cmpl> Forget for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>where
Lang: ?Sized,
impl<P, O, L, Ctx, Lang, Cmpl> Freeze for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>where
P: Freeze,
PhantomData<O>: Freeze,
PhantomData<L>: Freeze,
PhantomData<Ctx>: Freeze,
PhantomData<Lang>: Freeze,
PhantomData<Cmpl>: Freeze,
Lang: ?Sized,
impl<P, O, L, Ctx, Lang, Cmpl> Move for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>where
Lang: ?Sized,
impl<P, O, L, Ctx, Lang, Cmpl> RefUnwindSafe for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>where
P: RefUnwindSafe,
PhantomData<O>: RefUnwindSafe,
PhantomData<L>: RefUnwindSafe,
PhantomData<Ctx>: RefUnwindSafe,
PhantomData<Lang>: RefUnwindSafe,
PhantomData<Cmpl>: RefUnwindSafe,
Lang: ?Sized,
impl<P, O, L, Ctx, Lang, Cmpl> Send for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>where
P: Send,
PhantomData<O>: Send,
PhantomData<L>: Send,
PhantomData<Ctx>: Send,
PhantomData<Lang>: Send,
PhantomData<Cmpl>: Send,
Lang: ?Sized,
impl<P, O, L, Ctx, Lang, Cmpl> Sync for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>where
P: Sync,
PhantomData<O>: Sync,
PhantomData<L>: Sync,
PhantomData<Ctx>: Sync,
PhantomData<Lang>: Sync,
PhantomData<Cmpl>: Sync,
Lang: ?Sized,
impl<P, O, L, Ctx, Lang, Cmpl> Unpin for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>where
P: Unpin,
PhantomData<O>: Unpin,
PhantomData<L>: Unpin,
PhantomData<Ctx>: Unpin,
PhantomData<Lang>: Unpin,
PhantomData<Cmpl>: Unpin,
Lang: ?Sized,
impl<P, O, L, Ctx, Lang, Cmpl> UnsafeUnpin for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>where
P: UnsafeUnpin,
PhantomData<O>: UnsafeUnpin,
PhantomData<L>: UnsafeUnpin,
PhantomData<Ctx>: UnsafeUnpin,
PhantomData<Lang>: UnsafeUnpin,
PhantomData<Cmpl>: UnsafeUnpin,
Lang: ?Sized,
impl<P, O, L, Ctx, Lang, Cmpl> UnwindSafe for PaddedLeft<P, O, L, Ctx, Lang, Cmpl>where
P: UnwindSafe,
PhantomData<O>: UnwindSafe,
PhantomData<L>: UnwindSafe,
PhantomData<Ctx>: UnwindSafe,
PhantomData<Lang>: UnwindSafe,
PhantomData<Cmpl>: UnwindSafe,
Lang: ?Sized,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<'inp, F, L, O, Ctx, Lang, Cmpl> ParseInputUnwrapExt<'inp, L, O, Ctx, Lang, Cmpl> for Fwhere
F: ParseInput<'inp, L, Option<O>, Ctx, Lang, Cmpl>,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Lang: ?Sized,
impl<'inp, F, L, O, Ctx, Lang, Cmpl> ParseInputUnwrapExt<'inp, L, O, Ctx, Lang, Cmpl> for Fwhere
F: ParseInput<'inp, L, Option<O>, Ctx, Lang, Cmpl>,
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Lang: ?Sized,
Source§impl<'inp, P, Power, L, Op, Pre, Ctx, Lang> ParsePrattLHS<'inp, Power, Op, Pre, L, Ctx, Lang> for Pwhere
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
P: ParseInput<'inp, L, PrattLHS<Op, Pre, Power>, Ctx, Lang>,
Lang: ?Sized,
impl<'inp, P, Power, L, Op, Pre, Ctx, Lang> ParsePrattLHS<'inp, Power, Op, Pre, L, Ctx, Lang> for Pwhere
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
P: ParseInput<'inp, L, PrattLHS<Op, Pre, Power>, Ctx, Lang>,
Lang: ?Sized,
Source§fn parse_pratt_lhs(
&mut self,
input: &mut InputRef<'inp, '_, L, Ctx, Lang>,
) -> Result<PrattLHS<Op, Pre, Power>, <<Ctx as ParseContext<'inp, L, Lang>>::Emitter as Emitter<'inp, L, Lang>>::Error>where
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
fn parse_pratt_lhs(
&mut self,
input: &mut InputRef<'inp, '_, L, Ctx, Lang>,
) -> Result<PrattLHS<Op, Pre, Power>, <<Ctx as ParseContext<'inp, L, Lang>>::Emitter as Emitter<'inp, L, Lang>>::Error>where
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Available on crate feature
pratt only.Try to parse a pratt lhs from the lexer input, returning with its precedence level if successful.
Source§impl<'inp, P, Power, LeftAssoc, RightAssoc, NeitherAssoc, Post, L, Ctx, Lang> ParsePrattRHS<'inp, Power, LeftAssoc, RightAssoc, NeitherAssoc, Post, L, Ctx, Lang> for Pwhere
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
P: ParseInput<'inp, L, PrattRHS<LeftAssoc, RightAssoc, NeitherAssoc, Post, Power>, Ctx, Lang>,
Lang: ?Sized,
impl<'inp, P, Power, LeftAssoc, RightAssoc, NeitherAssoc, Post, L, Ctx, Lang> ParsePrattRHS<'inp, Power, LeftAssoc, RightAssoc, NeitherAssoc, Post, L, Ctx, Lang> for Pwhere
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
P: ParseInput<'inp, L, PrattRHS<LeftAssoc, RightAssoc, NeitherAssoc, Post, Power>, Ctx, Lang>,
Lang: ?Sized,
Source§fn parse_pratt_rhs(
&mut self,
input: &mut InputRef<'inp, '_, L, Ctx, Lang>,
) -> Result<PrattRHS<LeftAssoc, RightAssoc, NeitherAssoc, Post, Power>, <<Ctx as ParseContext<'inp, L, Lang>>::Emitter as Emitter<'inp, L, Lang>>::Error>where
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
fn parse_pratt_rhs(
&mut self,
input: &mut InputRef<'inp, '_, L, Ctx, Lang>,
) -> Result<PrattRHS<LeftAssoc, RightAssoc, NeitherAssoc, Post, Power>, <<Ctx as ParseContext<'inp, L, Lang>>::Emitter as Emitter<'inp, L, Lang>>::Error>where
L: Lexer<'inp>,
Ctx: ParseContext<'inp, L, Lang>,
Available on crate feature
pratt only.Try to parse a pratt rhs from the lexer input, returning with its precedence level if successful.