trait ParserStatementErrorMapper<T> {
// Required methods
fn map_parser_err(
self,
statement_kind: StatementKind,
) -> Result<T, ParserStatementError>;
fn map_no_statement_parser_err(self) -> Result<T, ParserStatementError>;
}
Required Methods§
sourcefn map_parser_err(
self,
statement_kind: StatementKind,
) -> Result<T, ParserStatementError>
fn map_parser_err( self, statement_kind: StatementKind, ) -> Result<T, ParserStatementError>
Wrap a ParserError
within a ParserStatementError
alongside the provided StatementKind
sourcefn map_no_statement_parser_err(self) -> Result<T, ParserStatementError>
fn map_no_statement_parser_err(self) -> Result<T, ParserStatementError>
Wrap a ParserError
within a ParserStatementError
without an accompanying
StatementKind
.
This should be used when we do not know what specific statement is being parsed.