Module nom::simple_errors [] [src]

Error management

Depending on a compilation flag, the content of the Context enum can change. In the default case, it will only have one variant: Context::Code(I, ErrorKind<E=u32>) (with I and E configurable). It contains an error code and the input position that triggered it.

If you activate the verbose-errors compilation flags, it will add another variant to the enum: Context::List(Vec<(I, ErrorKind<E>)>). This variant aggregates positions and error codes as the code backtracks through the nested parsers. The verbose errors feature allows for very flexible error management: you can know precisely which parser got to which part of the input. The main drawback is that it is a lot slower than default error management.

Enums

Context