/*
CLASS {Case|_class}, UNTESTED :

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

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

namespace AL4Compiler.Statements
{
    public class Case : Statement
    {
        /*
        BASE CLASS {Statement}(Work = 'CASE')

        {Expr}          Condition|_for_CASE
        {Var}           Values|_list[]
        {Expr}          Range1|_value
        {Expr}          Range2|_value
        {Expr}          Formatted|_assert_failed_string
        BOOL    Top_case|_statement_rather_then_branch
        -------------- 'for interpreter'
        INT		Int_values[]
        STR		Str_values[]
        
        METHOD Provide_int_values :
			CASE Int_values[].Count > 0 ? ==> ;
			FOR v IN Values[] :
			    CASE !v.Is_const ? CONTINUE v ;
			    Int_values[] << v.Int_c ; .
			    
        METHOD Provide_str_values :
			CASE Str_values[].Count > 0 ? ==> ;
			FOR v IN Values[] :
			    CASE !v.Is_const ? CONTINUE v ;
			    Str_values[] << v.Str_c ; .
        */
        public Case()
        {
            Work = Workflow.CASE;
        }

        public Expression Condition;
        public List<Variable> Values = new List<Variable>();
        public Expression Range1;
        public Expression Range2;
    }
}
/*
END
*/

