use crate::ast::prelude::*;
#[test]
#[cfg(not(miri))]
fn ast_parse() {
rt::<ast::ExprReturn>("return");
rt::<ast::ExprReturn>("return 42");
rt::<ast::ExprReturn>("#[attr] return 42");
}
#[derive(Debug, TryClone, Parse, PartialEq, Eq, ToTokens, Spanned)]
#[rune(parse = "meta_only")]
#[non_exhaustive]
pub struct ExprReturn {
#[rune(iter, meta)]
pub attributes: Vec<ast::Attribute>,
pub return_token: T![return],
#[rune(iter)]
pub expr: Option<Box<ast::Expr>>,
}
expr_parse!(Return, ExprReturn, "return expression");