-
Couldn't load subscription status.
- Fork 838
Open
Description
The // C++/EOL-style comments recipe seems to not match the expected content. The expected parser here should accept //...\n, whereas the example for some reason works with a single char '%'. Moreover, ideally I would like an example that requires a newline with an optional end-of-line comment before that. Am I misreading it?
/// This version uses % to start a comment, does not consume the newline character, and returns an output of ().
pub fn peol_comment<'a, E: ParseError<&'a str>>(i: &'a str) -> IResult<&'a str, (), E>
{
value(
(), // Output is thrown away.
pair(char('%'), is_not("\n\r"))
).parse(i)
}Metadata
Metadata
Assignees
Labels
No labels