コード例 #1
0
        /// <summary>
        ///     Provides the context on which function evaluation should be performed
        /// </summary>
        /// <param name="context"></param>
        /// <param name="explain"></param>
        /// <returns></returns>
        private InterpretationContext GetContext(InterpretationContext context, ExplanationPart explain)
        {
            InterpretationContext retVal = context;

            DerefExpression deref = Call.Called as DerefExpression;

            if (deref != null)
            {
                IValue value = deref.GetPrefixValue(context, deref.Arguments.Count - 1, explain) as IValue;
                if (value != null)
                {
                    retVal = new InterpretationContext(context, value);
                }
            }

            return(retVal);
        }
コード例 #2
0
        /// <summary>
        /// Provides the context on which function evaluation should be performed
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private InterpretationContext getContext(InterpretationContext context)
        {
            InterpretationContext retVal = context;

            DerefExpression deref = Call.Called as DerefExpression;

            if (deref != null)
            {
                Values.IValue value = deref.GetPrefixValue(context, deref.Arguments.Count - 1) as Values.IValue;
                if (value != null)
                {
                    retVal = new InterpretationContext(context, value);
                }
            }

            return(retVal);
        }