rune/ast/expr_empty.rs
1use crate::ast::prelude::*;
2
3/// A prioritized expression group without delimiters `<expr>`.
4///
5/// These groups are only produced during internal desugaring. Most notably
6/// through the use of template literals.
7#[derive(Debug, TryClone, PartialEq, Eq, ToTokens, Spanned)]
8#[non_exhaustive]
9pub struct ExprEmpty {
10 /// Attributes associated with expression.
11 #[rune(iter)]
12 pub attributes: Vec<ast::Attribute>,
13 /// The open parenthesis.
14 pub open: ast::OpenEmpty,
15 /// The grouped expression.
16 pub expr: Box<ast::Expr>,
17 /// The close parenthesis.
18 pub close: ast::CloseEmpty,
19}
20
21expr_parse!(Empty, ExprEmpty, "empty group expression");