1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
use crate::ast; use crate::{Parse, Spanned, ToTokens}; /// A `continue` statement: `continue [label]`. /// /// ```rust /// use rune::{testing, ast}; /// /// testing::roundtrip::<ast::ExprContinue>("continue"); /// testing::roundtrip::<ast::ExprContinue>("continue 'foo"); /// ``` #[derive(Debug, Clone, PartialEq, Eq, Parse, ToTokens, Spanned)] #[rune(parse = "meta_only")] pub struct ExprContinue { /// The attributes of the `break` expression #[rune(iter, meta)] pub attributes: Vec<ast::Attribute>, /// The return token. pub break_token: T![continue], /// An optional label to continue to. #[rune(iter)] pub label: Option<ast::Label>, } expr_parse!(Continue, ExprContinue, "continue expression");