Пример #1
0
        public static QsiSetColumnExpressionNode VisitAdditionAssignColumnOp(AdditionAssignColumnOpContext context)
        {
            var node = new CqlSetColumnExpressionNode
            {
                Target   = new QsiQualifiedIdentifier(context.l.id),
                Operator = context.op
            };

            node.Value.SetValue(VisitTerm(context.r));
            CqlTree.PutContextSpan(node, context);

            return(node);
        }
Пример #2
0
        public static QsiSetColumnExpressionNode VisitCollectionColumnOp(CollectionColumnOpContext context)
        {
            var node = new CqlSetColumnExpressionNode
            {
                Operator = context.op
            };

            var memberAccessNode = new QsiMemberAccessExpressionNode();
            var indexerNode      = new CqlIndexerExpressionNode();

            indexerNode.Indexer.SetValue(VisitTerm(context.k));
            memberAccessNode.Target.SetValue(VisitCident(context.l));
            memberAccessNode.Member.SetValue(indexerNode);

            node.TargetExpression.SetValue(memberAccessNode);
            node.Value.SetValue(VisitTerm(context.r));

            CqlTree.PutContextSpan(node, context);

            return(node);
        }
Пример #3
0
        public static QsiSetColumnExpressionNode VisitFieldColumnOp(FieldColumnOpContext context)
        {
            var node = new CqlSetColumnExpressionNode
            {
                Operator = context.op
            };

            var memberAccessNode = new QsiMemberAccessExpressionNode();

            memberAccessNode.Target.SetValue(VisitCident(context.l));

            memberAccessNode.Member.SetValue(new QsiFieldExpressionNode
            {
                Identifier = new QsiQualifiedIdentifier(context.field.id)
            });

            node.TargetExpression.SetValue(memberAccessNode);
            node.Value.SetValue(VisitTerm(context.r));

            CqlTree.PutContextSpan(node, context);

            return(node);
        }