MCPcopy Create free account
hub / github.com/PRQL/prql / newline

Function newline

prqlc/prqlc-parser/src/lexer/mod.rs:245–249  ·  view source on GitHub ↗

Custom newline parser for Stream

()

Source from the content-addressed store, hash-verified

243
244// Custom newline parser for Stream<char>
245fn 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
251fn line_wrap<'a>() -> impl Parser<'a, ParserInput<'a>, TokenKind, ParserError<'a>> {
252 newline()

Callers 3

tokenFunction · 0.85
line_wrapFunction · 0.85
end_exprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected