That's especially weird when mixed with nom::error::context() as it gets the same format. Thus it becomes:
0: at line 1, in Fail:
callback TotheFuture = void ()
^
1: at line 1, in CallbackDefinition:
callback TotheFuture = void ()
^
I'd rather completely skip , in Fail in this example, or it would be even better if I could add a custom message why it needs to fail there, e.g. "Missing semicolon".
Prerequisites
Here are a few things you should provide to help me understand the issue:
rustc 1.66.0 (69f9c33d7 2022-12-12)
7.1.2
Description
Per the current implementation, only
Char
gets proper English sentence and others only getin (ErrorKind):
e.g.in Fail
fromnom::combinator::fail()
.https://github.com/rust-bakery/nom/blob/6923bacfd4e7496f56de787071bd221fef86faf4/src/error.rs#L343-L345
That's especially weird when mixed with
nom::error::context()
as it gets the same format. Thus it becomes:I'd rather completely skip
, in Fail
in this example, or it would be even better if I could add a custom message why it needs to fail there, e.g. "Missing semicolon".Can the messages get some customization?