Crate monch

Source

Structs§

ParseErrorFailure
A complete parsing failure along with the location the error occurred and the error message.
ParseErrorFailureError

Enums§

ParseError
An error that occurred while parsing.

Traits§

IsEmptyable

Functions§

assert
Asserts that a given condition is true about the combinator. Otherwise returns an error with the message.
assert_exists
Asserts that a combinator resolves. If backtracing occurs, returns a failure.
ch
Recognizes a character.
check_not
Checks if a combinator is false without consuming the input.
delimited
Gets a second value that is delimited by a first and third.
if_not_empty
Checks if the combinator result is not empty.
if_true
Checks if a condition is true for a combinator.
log_result
Logs the result for quick debugging purposes.
many0
Applies the combinator 0 or more times and returns a vector of all the parsed results.
many1
Applies the combinator at least 1 time, but maybe more and returns a vector of all the parsed results.
many_till
Keeps consuming a combinator into an array until a condition is met or backtracing occurs.
map
Maps the success of a combinator by a function.
map_res
Maps the result of a combinator by a function.
maybe
Maps a success to Some(T) and a backtrace to None.
next_char
Gets the next character.
one_of
Recognizes any character in the provided string.
or
Checks for either to match.
or3
Checks for any to match.
or4
Checks for any to match.
or5
Checks for any to match.
or6
Checks for any to match.
or7
Checks for any to match.
pair
Returns both results of the two combinators.
preceded
Returns the second value and discards the first.
separated_list
Keeps consuming a combinator into an array until a condition is met or backtracing occurs.
skip_while
Skip the input while the condition is true.
skip_whitespace
Skips the whitespace.
substring
Gets the substring found for the duration of the combinator.
tag
Recognizes a string.
take_while
Takes a substring while the condition is true.
terminated
Returns the first value and discards the second.
whitespace
Parses and expects whitespace.
with_error_context
Provides some context to a failure.
with_failure_handling
Opinionated helper that converts a combinator into a Result<T, String>
with_failure_input
Changes the input on a failure in order to provide a better error message.

Type Aliases§

ParseResult