rustidy_ast/expr/without_block/
tuple_indexing.rs1use {
4 crate::{expr::{Expression, ExpressionInner}, token},
5 super::{ExpressionWithoutBlockInner, TupleIndex},
6 rustidy_format::{Format, Formattable, WhitespaceFormat},
7 rustidy_parse::ParseRecursive,
8 rustidy_print::Print,
9 rustidy_util::Whitespace,
10};
11
12#[derive(PartialEq, Eq, Clone, Debug)]
14#[derive(serde::Serialize, serde::Deserialize)]
15#[derive(ParseRecursive, Formattable, Format, Print)]
16#[parse_recursive(root = ExpressionInner)]
17#[parse_recursive(into_root = ExpressionWithoutBlockInner)]
18#[parse_recursive(kind = "left")]
19pub struct TupleIndexingExpression {
20 pub expr: Expression,
21 #[format(prefix_ws = Whitespace::REMOVE)]
22 pub dot: token::Dot,
23 #[format(prefix_ws = Whitespace::REMOVE)]
24 pub ident: TupleIndex,
25}