예제 #1
0
        internal void AddExpressionEvaluation(Expression expression, JsValue value, Statement statement, int statementIndex, Statement parentStatement, int?parentStatementIndex)
        {
            StatementEvaluation statementEvaluation       = null;
            StatementEvaluation parentStatementEvaluation = null;

            if (parentStatementIndex.HasValue)
            {
                if (StatementEvaluationList.ContainsKey(parentStatementIndex.Value))
                {
                    parentStatementEvaluation = StatementEvaluationList[parentStatementIndex.Value];
                }
                else
                {
                    parentStatementEvaluation = new StatementEvaluation(parentStatement, parentStatementIndex.Value);
                    StatementEvaluationList.Add(parentStatementIndex.Value, parentStatementEvaluation);
                }
            }
            if (StatementEvaluationList.ContainsKey(statementIndex))
            {
                statementEvaluation = StatementEvaluationList[statementIndex];
            }
            else
            {
                statementEvaluation = new StatementEvaluation(statement, statementIndex, parentStatementEvaluation);
                StatementEvaluationList.Add(statementIndex, statementEvaluation);
            }

            ExpressionEvaluation expressionEvaluation = new ExpressionEvaluation(expression, value, statementEvaluation);

            //statementEvaluation.AddExpressionEvaluation(expressionEvaluation);

            AddExpressionEvaluation(expressionEvaluation);
        }
예제 #2
0
 public StatementEvaluation(Statement statement, int index, StatementEvaluation statementEvaluationParent = null)
 {
     Statement                = statement;
     Index                    = index;
     StatementParent          = statementEvaluationParent;
     expressionEvaluationList = new List <ExpressionEvaluation>();
 }
예제 #3
0
 internal ExpressionEvaluation(Expression expression, JsValue jsValue, StatementEvaluation statementEvaluation)
 {
     Expression = expression;
     JsValue    = jsValue;
     Value      = new DebugValue(jsValue.Type.ToString(), jsValue.ToString());
     Statement  = statementEvaluation;
 }