code: public R scan(TreePath path, P p) {
          this.path = path;
          try {
              return path.getLeaf().accept(this, p);
          } finally {
              this.path = null;
          }
      }
docs: Scan a tree from a position identified by a TreePath.