Ejemplo n.º 1
0
 public object Visit(ASTOrExpression node, object data)
 {
     System.Console.Out.WriteLine(IndentString() + node);
     ++indent;
     data = node.ChildrenAccept(this, data);
     --indent;
     return(data);
 }
Ejemplo n.º 2
0
        public object Visit(ASTOrExpression node, object data)
        {
            object left = node.JjtGetChild(0).JjtAccept(this, data);

            if (node.JjtGetNumChildren() == 1)
            {
                return(left);
            }
            var right = (IQueryAtom)node.JjtGetChild(1).JjtAccept(this, data);

            return(LogicalOperatorAtom.Or((IQueryAtom)left, right));
        }
Ejemplo n.º 3
0
        public object Visit(ASTOrExpression node, object data)
        {
            string left = (string)node.JjtGetChild(0).JjtAccept(this, data);

            if (node.JjtGetNumChildren() == 1)
            {
                return(left);
            }
            string right = (string)node.JjtGetChild(1).JjtAccept(this, data);

            if (left.Length == 0)
            {
                return(right);
            }
            else if (right.Length == 0)
            {
                return(left);
            }
            else
            {
                return(left + "|" + right);
            }
        }