示例#1
0
        public override Node ExitInExpression(Production node)
        {
            IList childValues = GetChildValues(node);

            if (childValues.Count == 1)
            {
                AddFirstChildValue(node);
                return(node);
            }

            var operand = (BaseExpressionElement)childValues[0];

            childValues.RemoveAt(0);

            var       second = childValues[0];
            InElement op;

            if (second is IList list)
            {
                op = new InElement(operand, list);
            }
            else
            {
                var invocationListElement = new InvocationListElement(childValues, context);
                op = new InElement(operand, invocationListElement);
            }

            node.AddValue(op);
            return(node);
        }
示例#2
0
        public override Node ExitInExpression(Production node)
        {
            IList childValues = this.GetChildValues(node);

            if (childValues.Count == 1)
            {
                this.AddFirstChildValue(node);
                return(node);
            }

            ExpressionElement operand = (ExpressionElement)childValues[0];

            childValues.RemoveAt(0);

            object    second = childValues[0];
            InElement op     = default(InElement);

            if ((second) is IList)
            {
                op = new InElement(operand, (IList)second);
            }
            else
            {
                InvocationListElement il = new InvocationListElement(childValues, _myServices);
                op = new InElement(operand, il);
            }

            node.AddValue(op);
            return(node);
        }
示例#3
0
        public override Node ExitMemberExpression(Production node)
        {
            IList childValues = GetChildValues(node);
            var   first       = childValues[0];

            if (childValues.Count == 1 && !(first is MemberElement))
            {
                node.AddValue(first);
            }
            else
            {
                var invocationListElement = new InvocationListElement(childValues, context);
                node.AddValue(invocationListElement);
            }

            return(node);
        }
示例#4
0
        public override Node ExitMemberExpression(Production node)
        {
            IList  childValues = this.GetChildValues(node);
            object first       = childValues[0];

            if (childValues.Count == 1 && !(first is MemberElement))
            {
                node.AddValue(first);
            }
            else
            {
                InvocationListElement list = new InvocationListElement(childValues, _myServices);
                node.AddValue(list);
            }

            return(node);
        }