code: private LocationStepQueryNode createLocationStep(SimpleNode node, NAryQueryNode parent) {
          LocationStepQueryNode queryNode = null;
          boolean descendant = false;
          Node p = node.jjtGetParent();
          for (int i = 0; i < p.jjtGetNumChildren(); i++) {
              SimpleNode c = (SimpleNode) p.jjtGetChild(i);
              if (c == node) { // NOSONAR
                  queryNode = factory.createLocationStepQueryNode(parent);
                  queryNode.setNameTest(null);
                  queryNode.setIncludeDescendants(descendant);
                  parent.addOperand(queryNode);
                  break;
              }
              descendant = (c.getId() == JJTSLASHSLASH
                      || c.getId() == JJTROOTDESCENDANTS);
          }
  
          node.childrenAccept(this, queryNode);
  
          return queryNode;
      }
docs: Creates a <code>LocationStepQueryNode</code> at the current position
  in parent.
  
  @param node   the current node in the xpath syntax tree.
  @param parent the parent <code>PathQueryNode</code>.
  @return the created <code>LocationStepQueryNode</code>.