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

Function line_wrap

prqlc/prqlc-parser/src/lexer/mod.rs:251–264  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249}
250
251fn line_wrap<'a>() -> impl Parser<'a, ParserInput<'a>, TokenKind, ParserError<'a>> {
252 newline()
253 .ignore_then(
254 whitespace()
255 .repeated()
256 .ignore_then(comment())
257 .then_ignore(newline())
258 .repeated()
259 .collect(),
260 )
261 .then_ignore(whitespace().repeated())
262 .then_ignore(just('\\'))
263 .map(TokenKind::LineWrap)
264}
265
266fn comment<'a>() -> impl Parser<'a, ParserInput<'a>, TokenKind, ParserError<'a>> {
267 // Extract the common comment text parser

Callers 1

tokenFunction · 0.70

Calls 5

newlineFunction · 0.85
whitespaceFunction · 0.85
mapMethod · 0.80
commentFunction · 0.70
collectMethod · 0.45

Tested by

no test coverage detected