コード例 #1
0
        public override Evaluation VisitArgument(ArgumentSyntax node)
        {
            Frame frame = _callStack.Peek();

            IEnumerable <Instance> found = frame.ContainingHeap.FindInstance(node.GetReference(), _comp);

            node.NameColon?.Accept <Evaluation>(this);
            node.Expression?.Accept <Evaluation>(this);

            int count = found.Count();

            if (count > 1)
            {
                Log.Warn("More then one instance found for argument: {0}", node.ToString());
            }
            else if (count == 0)
            {
                Log.Error("Argument instance not found for node {0}", node.ToString());
            }

            return(found.FirstOrDefault());
        }