Trait oni_comb_parser_rs::prelude::ParserRunner
source · pub trait ParserRunner<'a> {
type Input;
type Output;
type P<'m, X, Y>: ParserMonad<'m, Input = X, Output = Y>
where X: 'm;
// Required methods
fn parse(
&self,
input: &'a [Self::Input],
) -> ParseResult<'a, Self::Input, Self::Output>;
fn run(
&self,
param: &ParseState<'a, Self::Input>,
) -> ParseResult<'a, Self::Input, Self::Output>;
// Provided method
fn parse_as_result(
&self,
input: &'a [Self::Input],
) -> Result<Self::Output, ParseError<'a, Self::Input>> { ... }
}Required Associated Types§
type Input
type Output
type P<'m, X, Y>: ParserMonad<'m, Input = X, Output = Y> where X: 'm
Required Methods§
sourcefn parse(
&self,
input: &'a [Self::Input],
) -> ParseResult<'a, Self::Input, Self::Output>
fn parse( &self, input: &'a [Self::Input], ) -> ParseResult<'a, Self::Input, Self::Output>
Analyze input value(for ParseResult).
入力を解析する。
sourcefn run(
&self,
param: &ParseState<'a, Self::Input>,
) -> ParseResult<'a, Self::Input, Self::Output>
fn run( &self, param: &ParseState<'a, Self::Input>, ) -> ParseResult<'a, Self::Input, Self::Output>
Analyze input value(for ParseResult).
入力を解析する。
Requires ParseState argument.
引数にParseStateが必要です。
Provided Methods§
sourcefn parse_as_result(
&self,
input: &'a [Self::Input],
) -> Result<Self::Output, ParseError<'a, Self::Input>>
fn parse_as_result( &self, input: &'a [Self::Input], ) -> Result<Self::Output, ParseError<'a, Self::Input>>
Analyze input value(for Result).
入力を解析する。
Object Safety§
This trait is not object safe.