/*
CLASS {For|_loop}, SAFE :

IMPORT: {Statement}, {Expression}, {Variable} ;
(***************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AL4Compiler._CSharp
{
    public class For : Statement
    {
        /*
        BASE CLASS {Statement}(Work = 'FOR')
        ------------------------------------- 'for loop'
        {Var}     Var|iable
        {Expr}    Array|_for_FOR
        {Expr}    Range1|_value
        {Expr}    Range2|_value
        BOOL      Downto|_index
        BOOL	  Infinite
        {Expr}	  In_struct_array|_initially_but_converted_to_IN_RANGE
        ------------------------------------- 'compile'
        {For}     Loop_|to_break_or_continue_
        BOOL      Breaked|_by_break
        BOOL      Continued|_by_continue
        {Expr}	  By|_next_index_increment
        BOOL	  Has_next|_statements
        ------------------------------------- 'DONE position'
        INT		  Done|_position INDEXING {Statement} = -1
        ------------------------------------- 'optimization'
        INT		  First_index_in_fun|ction
        INT		  Last_index_in_fun|ction
        BOOL	  Unroll|_loop
        INT		  Unroll_factor
        {For}	  Corresponding_|FOR_for_duplicated_statement_
        ------------------------------------- 'code generation'
        STR		  Continue_label|_name_to_go_to
        STR		  Index_var|iable_name_only_for_case_of_array
        ------------------------------------- 'interpreter only'
        INT		  Index_value_offset|_in_stack_from_RP
        ------------------------------------- 'debug'
        INT       Total_FOR
        */

        public For()
        {
            Work = Workflow.FOR;
        }

        //----------------------------------- 'for loop'
        public Variable Var;
        public Expression Array;
        public Expression Range1;
        public Expression Range2;
        public bool Downto;
        public Statement Loop_;
        //----------------------------------- 'compile'
        public bool Breaked;
        public bool Continued;
    }
}
/*
END
*/

