GlueViewOfficialPlugins.Scripting.ScriptParsingPlugin.ApplyAssignment C# (CSharp) Method

ApplyAssignment() public method

public ApplyAssignment ( CodeContext codeContext, string leftOfEquals, string rightOfEquals, string newVariableDeclarationType, AssignmentOperatorType assignmentOperator ) : bool
codeContext GlueView.Scripting.CodeContext
leftOfEquals string
rightOfEquals string
newVariableDeclarationType string
assignmentOperator AssignmentOperatorType
return bool
        public bool ApplyAssignment(CodeContext codeContext, string leftOfEquals, string rightOfEquals, string newVariableDeclarationType,
            AssignmentOperatorType assignmentOperator)
        {
            bool succeeded = false;
            if (newVariableDeclarationType == null && variables.Contains(leftOfEquals))
            {
                // Circular depenency detected!
                AddErrorText("Circular dependency detected on " + leftOfEquals);
            }
            else
            {

                variables.Add(leftOfEquals);

                try
                {
                    AssignValue(newVariableDeclarationType, leftOfEquals, rightOfEquals, codeContext, assignmentOperator);
                    succeeded = true;
                }
                catch (Exception exception)
                {
                    string combined = newVariableDeclarationType + " " + leftOfEquals + " assignment " + rightOfEquals;
                    AddErrorText("Parse error in:  " + combined);
                    mParserLog.AppendLine("Parse error for line " + combined + "\nException:\n" + exception);
                }
                variables.Remove(leftOfEquals);
            }

            return succeeded;
        }

Same methods

ScriptParsingPlugin::ApplyAssignment ( VariableInitializer variableInitializer, VariableDeclarationStatement vds, CodeContext codeContext ) : bool