public static void AnalizeVariablesInExpression(string expression, VariableStacks variables, ExpressionAnalizationMode mode)
        {
            expressionForAnalization = expression;
            avaliableVariables = variables;
            curMode = mode;

            ProcessVariables();
        }
        public Initializer(string code, IEnumerable<Variable> classVariables)
        {
            this.Variables = new VariableStacks(classVariables);
            code = GetBody(code);
            DeleteUnusefulForChapinWords(ref code);

            this.SplittedBody = SplitCodeOnOperators(code);
            this.Analize();
        }
 private static void SetModefiedObjectThatCallsMethodIfExists(string operatorCode, VariableStacks variables)
 {
     string variableName = CodePartsFinder.GetPossibleVariableNameUsedForMethodCallOrWayToField(operatorCode);
     Variable variable = variables.GetTopVariable(variableName);
     if (variable != null)
         variable.SetModefied();
 }
 public void ProcessOperatorAccordingItsType(ref VariableStacks variables)
 {
     this.Type.ProcessOperator(OperatorCode, variables);
 }
 private static void ProcessCodePartAsCondition(string code, VariableStacks variables)
 {
     const ExpressionAnalizationMode modeForConditionPart = ExpressionAnalizationMode.IsContolMode;
     ExpressionVariablesAnalizer.AnalizeVariablesInExpression(code, variables, modeForConditionPart);
 }
        private static ExpressionAnalizationMode ProcessAssignedVariableAndReturnItsMode(string operatorCode, VariableStacks variables)
        {
            const char simpleAssignOperator = '=';
            int assignPos = operatorCode.IndexOf(simpleAssignOperator);

            string modefiedVariable =
                GetAssignedVariableNameUsingAssignOperatorPos(operatorCode,assignPos);
            Variable variableTookPartInAssignment = variables.GetTopVariable(modefiedVariable);

            if (variableTookPartInAssignment == null)
                return ExpressionAnalizationMode.IsUsedForComputingMode;
            ExpressionAnalizationMode variableMode = GetModeAccordingVariable(variableTookPartInAssignment);
            if (SimpleAssignmentOperatorExists(operatorCode))
            {
                variableTookPartInAssignment.IsCurrentlyUsedAsControl = false;
                variableTookPartInAssignment.IsCurrentlyUsedForComputing = false;
            }

            variableTookPartInAssignment.SetModefied();
            return variableMode;
        }