use crate::*; // ----------------------------------------------------------------------------- #[derive(Clone, Debug, PartialEq, Node)] pub enum LoopStatement { Forever(Box), Repeat(Box), While(Box), For(Box), DoWhile(Box), Foreach(Box), } #[derive(Clone, Debug, PartialEq, Node)] pub struct LoopStatementForever { pub nodes: (Keyword, StatementOrNull), } #[derive(Clone, Debug, PartialEq, Node)] pub struct LoopStatementRepeat { pub nodes: (Keyword, Paren, StatementOrNull), } #[derive(Clone, Debug, PartialEq, Node)] pub struct LoopStatementWhile { pub nodes: (Keyword, Paren, StatementOrNull), } #[derive(Clone, Debug, PartialEq, Node)] pub struct LoopStatementFor { pub nodes: ( Keyword, Paren<( Option, Symbol, Option, Symbol, Option, )>, StatementOrNull, ), } #[derive(Clone, Debug, PartialEq, Node)] pub struct LoopStatementDoWhile { pub nodes: (Keyword, StatementOrNull, Keyword, Paren, Symbol), } #[derive(Clone, Debug, PartialEq, Node)] pub struct LoopStatementForeach { pub nodes: ( Keyword, Paren<(PsOrHierarchicalArrayIdentifier, Bracket)>, Statement, ), } #[derive(Clone, Debug, PartialEq, Node)] pub enum ForInitialization { ListOfVariableAssignments(Box), Declaration(Box), } #[derive(Clone, Debug, PartialEq, Node)] pub struct ForInitializationDeclaration { pub nodes: (List,), } #[derive(Clone, Debug, PartialEq, Node)] pub struct ForVariableDeclaration { pub nodes: ( Option, DataType, List, ), } #[derive(Clone, Debug, PartialEq, Node)] pub struct Var { pub nodes: (Keyword,), } #[derive(Clone, Debug, PartialEq, Node)] pub struct ForStep { pub nodes: (List,), } #[derive(Clone, Debug, PartialEq, Node)] pub enum ForStepAssignment { OperatorAssignment(Box), IncOrDecExpression(Box), FunctionSubroutineCall(Box), } #[derive(Clone, Debug, PartialEq, Node)] pub struct LoopVariables { pub nodes: (List>,), }