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