(expr: E)
| 371 | #[allow(dead_code)] |
| 372 | #[cfg(not(coverage))] |
| 373 | fn aliased<'a, I, E>(expr: E) -> impl Parser<'a, I, Expr, ParserError<'a>> + Clone + 'a |
| 374 | where |
| 375 | I: Input<'a, Token = lr::Token, Span = Span> + BorrowInput<'a>, |
| 376 | E: Parser<'a, I, Expr, ParserError<'a>> + Clone + 'a, |
| 377 | { |
| 378 | let aliased = ident_part() |
| 379 | .then_ignore(ctrl('=')) |
| 380 | .then(expr) |
| 381 | .map(|(alias, mut expr)| { |
| 382 | expr.alias = Some(alias); |
| 383 | expr |
| 384 | }); |
| 385 | // Because `expr` accounts for parentheses, and aliased is `x=$expr`, we |
| 386 | // need to allow another layer of parentheses here. |
| 387 | aliased |
| 388 | .clone() |
| 389 | .or(aliased.delimited_by(ctrl('('), ctrl(')'))) |
| 390 | } |
| 391 | |
| 392 | fn maybe_aliased<'a, I, E>(expr: E) -> impl Parser<'a, I, Expr, ParserError<'a>> + Clone + 'a |
| 393 | where |
nothing calls this directly
no test coverage detected