Custom newline parser for Stream
()
| 243 | |
| 244 | // Custom newline parser for Stream<char> |
| 245 | fn newline<'a>() -> impl Parser<'a, ParserInput<'a>, (), ParserError<'a>> { |
| 246 | just('\n') |
| 247 | .or(just('\r').then_ignore(just('\n').or_not())) |
| 248 | .ignored() |
| 249 | } |
| 250 | |
| 251 | fn line_wrap<'a>() -> impl Parser<'a, ParserInput<'a>, TokenKind, ParserError<'a>> { |
| 252 | newline() |