예제 #1
0
        private void setOrderedArguments(FlowOutputSet callInput, IEnumerable <ValuePoint> arguments, LangElement declaration)
        {
            var index = 0;

            foreach (var arg in arguments)
            {
                var argVar        = argument(index);
                var argumentEntry = callInput.GetVariable(new VariableIdentifier(argVar));

                //assign value for parameter
                var argumentValue = arg.Value.ReadMemory(Output);
                argumentEntry.WriteMemory(callInput.Snapshot, argumentValue);

                ++index;
            }
        }
예제 #2
0
        private void setNamedArguments(FlowOutputSet callInput, CallSignature?callSignature, Signature signature, IEnumerable <ValuePoint> arguments)
        {
            int i = 0;

            foreach (var arg in arguments)
            {
                if (i >= signature.FormalParams.Count)
                {
                    break;
                }
                var param       = signature.FormalParams [i];
                var argumentVar = callInput.GetVariable(new VariableIdentifier(param.Name));

                var argumentValue = arg.Value.ReadMemory(Output);
                argumentVar.WriteMemory(callInput.Snapshot, argumentValue);

                ++i;
            }
            // TODO: if (arguments.Count() < signature.FormalParams.Count) and exists i > arguments.Count() signature.FormalParams[i].InitValue != null
        }