Returns a merged axis for a step preceded by a descendant-or-self step. @param expr step to test @return axis or null
(final Expr expr)
| 1096 | * @return axis or {@code null} |
| 1097 | */ |
| 1098 | private static Axis mergedAxis(final Expr expr) { |
| 1099 | if(expr instanceof final Step step) { |
| 1100 | final Axis axis = step.axis; |
| 1101 | if(!step.mayBePositional()) { |
| 1102 | if(axis == CHILD || axis == DESCENDANT) return DESCENDANT; |
| 1103 | if(axis == DESCENDANT_OR_SELF) return DESCENDANT_OR_SELF; |
| 1104 | } |
| 1105 | } |
| 1106 | return null; |
| 1107 | } |
| 1108 | |
| 1109 | /** |
| 1110 | * Returns the common merged axis of multiple expressions. |
no test coverage detected