本文整理汇总了Java中org.intellij.lang.xpath.XPathTokenTypes.OR属性的典型用法代码示例。如果您正苦于以下问题:Java XPathTokenTypes.OR属性的具体用法?Java XPathTokenTypes.OR怎么用?Java XPathTokenTypes.OR使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.intellij.lang.xpath.XPathTokenTypes
的用法示例。
在下文中一共展示了XPathTokenTypes.OR属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitXPathBinaryExpression
@Override
public void visitXPathBinaryExpression(XPathBinaryExpression parent) {
if (myExpression == parent.getROperand()) {
final XPathElementType op = parent.getOperator();
final XPathExpression lop = parent.getLOperand();
if (op == XPathTokenTypes.AND || op == XPathTokenTypes.OR) {
myExpectedType = XPathType.BOOLEAN;
} else if (XPath2TokenTypes.NUMBER_OPERATIONS.contains(op)) {
if (isXPath1(myExpression)) {
myExpectedType = XPathType.NUMBER;
} else {
myExpectedType = matchingType(lop, op);
}
} else if (XPath2TokenTypes.COMP_OPS.contains(op)) {
if (lop != null && lop.getType() != XPathType.NODESET) {
if ((myExpectedType = lop.getType()) == XPathType.BOOLEAN) {
if (!isXPath1(myExpression)) myExpectedType = XPath2Type.BOOLEAN_STRICT;
} else if (myExpectedType == XPath2Type.BOOLEAN) {
myExpectedType = XPath2Type.BOOLEAN_STRICT;
}
} else {
myExpectedType = XPathType.UNKNOWN;
}
} else if (XPath2TokenTypes.INTERSECT_EXCEPT.contains(op)) {
myExpectedType = XPath2SequenceType.create(XPath2Type.NODE, XPath2SequenceType.Cardinality.ZERO_OR_MORE);
} else if (op == XPath2TokenTypes.TO) {
myExpectedType = XPath2Type.INTEGER;
} else {
myExpectedType = XPathType.UNKNOWN;
}
} else {
super.visitXPathBinaryExpression(parent);
}
}