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

Function raw_string

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

Source from the content-addressed store, hash-verified

535}
536
537fn raw_string<'a>() -> impl Parser<'a, ParserInput<'a>, Literal, ParserError<'a>> {
538 just("r")
539 .then(choice((just('\''), just('"'))))
540 .then(
541 any()
542 .filter(move |c: &char| *c != '\'' && *c != '"' && *c != '\n' && *c != '\r')
543 .repeated()
544 .to_slice(),
545 )
546 .then(choice((just('\''), just('"'))))
547 .map(
548 |(((_, _open_quote), s), _close_quote): (((&str, char), &str), char)| {
549 Literal::RawString(s.to_string())
550 },
551 )
552}
553
554fn boolean<'a>() -> impl Parser<'a, ParserInput<'a>, Literal, ParserError<'a>> {
555 choice((just("true").to(true), just("false").to(false)))

Callers 1

literalFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected