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

Function comment

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

Source from the content-addressed store, hash-verified

264}
265
266fn comment<'a>() -> impl Parser<'a, ParserInput<'a>, TokenKind, ParserError<'a>> {
267 // Extract the common comment text parser
268 let comment_text = none_of("\n\r").repeated().collect::<String>();
269
270 just('#').ignore_then(
271 // One option would be to check that doc comments have new lines in the
272 // lexer (we currently do in the parser); which would give better error
273 // messages?
274 just('!')
275 .ignore_then(comment_text.map(TokenKind::DocComment))
276 .or(comment_text.map(TokenKind::Comment)),
277 )
278}
279
280pub fn ident_part<'a>() -> impl Parser<'a, ParserInput<'a>, String, ParserError<'a>> {
281 let plain = any()

Callers 2

tokenFunction · 0.70
line_wrapFunction · 0.70

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected