We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't use Cond, Map and Parse at the same time. Such code won't be compiled:
#[nom( Cond = "a == 0" Parse = "take_till(|b| b == b'0')", Map = "bytes_to_cstring" )] cstring: Option<CString>
The text was updated successfully, but these errors were encountered:
Thanks for the report!
Note: a comma is missing after Cond (Cond = "a == 0",)
Cond
Cond = "a == 0",
I get the following error:
message: A condition was given on field cstring, which is not an option type. Hint: use Option<...>
It seems the parser does not get the type correctly. I'll investigate
Sorry, something went wrong.
Fixed in f8cdf02
The tested parser (added in unit tests) is:
#[derive(Debug, Nom)] pub struct MultipleAttributes1 { pub a: u32, #[nom( Cond = "a == 0", Parse = "take_till(|b| b == 0)", Map = "bytes_to_cstring" )] cstring: Option<CString>, }
(note: take_till leaves a trailing \0 unparsed, I don't know if that was intended here)
take_till
\0
No branches or pull requests
I can't use Cond, Map and Parse at the same time. Such code won't be compiled:
The text was updated successfully, but these errors were encountered: