Example #1
0
        public XmlElement Visit(BindParseNode bpn)
        {
            var el = makeNode(bpn, "bind");

            addProperty(el, "left", bpn.Left);
            addProperty(el, "right", bpn.Right);
            return(el);
        }
Example #2
0
        public static QsiColumnNode VisitBindParseNode(BindParseNode node)
        {
            var columnNode = new QsiBindingColumnNode
            {
                Id = $":{node.Index}"
            };

            PTree.RawNode[columnNode] = node;

            return(columnNode);
        }
Example #3
0
        /// <inheritdoc />
        public Node Visit(BindParseNode bpn)
        {
            var ret   = bpn.Left.Visit(this);
            var right = bpn.Right.Visit(this);
            var lrrn  = ret as RequestNode;

            if (lrrn != null)
            {
                lrrn.MakeBind(right);
                if (bpn.Left is OperatorParseNode ||
                    bpn.Left is InterpolatedStringParseNode)
                {
                    lrrn = null;
                }
            }
            if (lrrn == null)
            {
                var name = ret.GetType().Name;
                name = name.Substring(0, name.Length - 4);
                if (bpn.Left is OperatorParseNode)
                {
                    name = "Operator";
                }
                if (bpn.Left is InterpolatedStringParseNode)
                {
                    name = "StringLiteral";
                }
                ErrorReporting.ReportStaticError(bpn.Token.Module,
                                                 bpn.Line, "P1044",
                                                 new Dictionary <string, string> {
                    { "lhs", name }
                },
                                                 "Cannot assign to " + name);
            }
            return(ret);
        }
Example #4
0
 /// <inheritdoc/>
 public virtual ParseNode Visit(BindParseNode bpn)
 {
     bpn.Left.Visit(this);
     bpn.Right.Visit(this);
     return(bpn);
 }