Esempio n. 1
0
            public object ConvertToMimic(object on, IokeObject message, IokeObject context, bool signal)
            {
                object firstResult = first.ConvertToMimic(on, message, context, false);

                if (firstResult == context.runtime.nul)
                {
                    return(second.ConvertToMimic(on, message, context, signal));
                }
                else
                {
                    return(firstResult);
                }
            }
        public object GetValidatedArgumentsAndReceiver(IokeObject context, IokeObject message, object on, IList argumentsWithoutKeywords, IDictionary <string, object> givenKeywords)
        {
            if (!restUneval)
            {
                GetEvaluatedArguments(context, message, on, argumentsWithoutKeywords, givenKeywords);
                int ix = 0;
                for (int i = 0, j = this.arguments.Count; i < j; i++)
                {
                    Argument a = this.arguments[i];

                    if (a is KeywordArgument)
                    {
                        string name  = a.Name + ":";
                        object given = givenKeywords[name];
                        if (given != null)
                        {
                            givenKeywords[name] = mustMimic[0].ConvertToMimic(given, message, context, true);
                        }
                    }
                    else
                    {
                        if (ix < argumentsWithoutKeywords.Count)
                        {
                            argumentsWithoutKeywords[ix] = mustMimic[i].ConvertToMimic(argumentsWithoutKeywords[ix], message, context, true);
                            ix++;
                        }
                    }
                }
            }
            else
            {
                foreach (object o in message.Arguments)
                {
                    argumentsWithoutKeywords.Add(o);
                }
            }
            return(receiverMustMimic.ConvertToMimic(on, message, context, true));
        }