rune/ast/
expr_await.rs
1use crate::ast::prelude::*;
2
3#[test]
4#[cfg(not(miri))]
5fn ast_parse() {
6 rt::<ast::Expr>("(42).await");
7 rt::<ast::Expr>("self.await");
8 rt::<ast::Expr>("test.await");
9}
10
11#[derive(Debug, TryClone, PartialEq, Eq, ToTokens, Spanned)]
15#[non_exhaustive]
16pub struct ExprAwait {
17 #[rune(iter)]
19 pub attributes: Vec<ast::Attribute>,
20 pub expr: Box<ast::Expr>,
22 pub dot: T![.],
24 pub await_token: T![await],
26}
27
28expr_parse!(Await, ExprAwait, ".await expression");