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)); }
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); } }