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

Function lexer

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

Lex chars to tokens until the end of the input

()

Source from the content-addressed store, hash-verified

111
112/// Lex chars to tokens until the end of the input
113pub fn lexer<'a>() -> impl Parser<'a, ParserInput<'a>, Vec<Token>, ParserError<'a>> {
114 lex_token()
115 .repeated()
116 .collect()
117 .then_ignore(whitespace().or_not())
118}
119
120/// Lex chars to a single token
121fn lex_token<'a>() -> impl Parser<'a, ParserInput<'a>, Token, ParserError<'a>> {

Callers 9

lex_source_recoveryFunction · 0.85
lex_sourceFunction · 0.85
test_line_wrap_tokensFunction · 0.85
test_tokensFunction · 0.85
test_comment_tokensFunction · 0.85
test_doc_comment_tokensFunction · 0.85
test_timestamp_tokensFunction · 0.85
test_range_tokensFunction · 0.85

Calls 3

lex_tokenFunction · 0.85
whitespaceFunction · 0.85
collectMethod · 0.45

Tested by 7

test_line_wrap_tokensFunction · 0.68
test_tokensFunction · 0.68
test_comment_tokensFunction · 0.68
test_doc_comment_tokensFunction · 0.68
test_timestamp_tokensFunction · 0.68
test_range_tokensFunction · 0.68