(
result: Result<O, nom::Err<ParserError<&str>>>,
input: &str,
)
| 201 | pub type NomResult<'a, Ret> = IResult<&'a str, Ret, ParserError<&'a str>>; |
| 202 | |
| 203 | pub fn map_parse_result<O>( |
| 204 | result: Result<O, nom::Err<ParserError<&str>>>, |
| 205 | input: &str, |
| 206 | ) -> anyhow::Result<O> { |
| 207 | result.map_err(|e| format_parse_error(e, input)) |
| 208 | } |
| 209 | |
| 210 | /// Take a parser and input and return Result with a formatted error. |
| 211 | pub fn consume_all<'a, O, F>(f: F, input: &'a str) -> anyhow::Result<O> |
no test coverage detected