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

Function ident

prqlc/prqlc-parser/src/parser/expr.rs:536–549  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

534}
535
536pub(crate) fn ident<'a, I>() -> impl Parser<'a, I, Ident, ParserError<'a>> + Clone
537where
538 I: Input<'a, Token = lr::Token, Span = Span> + BorrowInput<'a>,
539{
540 ident_part()
541 .then_ignore(ctrl('.'))
542 .repeated()
543 .collect()
544 .then(choice((ident_part(), ctrl('*').map(|_| "*".to_string()))))
545 .map(|(mut parts, last): (Vec<String>, String)| {
546 parts.push(last);
547 Ident::from_path(parts)
548 })
549}
550
551fn operator_unary<'a, I>() -> impl Parser<'a, I, UnOp, ParserError<'a>> + Clone
552where

Callers 3

import_defFunction · 0.85
type_exprFunction · 0.85
exprFunction · 0.85

Calls 5

ctrlFunction · 0.85
mapMethod · 0.80
pushMethod · 0.80
ident_partFunction · 0.70
collectMethod · 0.45

Tested by

no test coverage detected