Added comment to string parser

This commit is contained in:
Nathan West 2020-01-07 17:03:27 -05:00 committed by Geoffroy Couprie
parent 6c15061f61
commit dba7d449c8

View File

@ -147,6 +147,10 @@ fn parse_string<'a, E: ParseError<&'a str>>(input: &'a str) -> IResult<&'a str,
},
);
// Finally, parse the string. Note that, if `build_string` could accept a raw
// " character, the closing delimiter " would never match. When using
// `delimited` with a looping parser (like fold_many0), be sure that the
// loop won't accidentally match your closing delimiter!
delimited(char('"'), build_string, char('"'))(input)
}