private void matchText(TreeElement leaf) {
        curOffset[0] = leaf.textMatches(buffer, curOffset[0]);
        if (curOffset[0] < 0) {
          stopWalking();
        }
      }
private void matchText(TreeElement leaf)