When a method is said to be called "on an object", this means that the object is a receiver. When a method is said to be called "with an object", this means that the object is a parameter.
To scan an instance of (Doc)Tree, the "scan" method is called on the instance of (Doc)TreeScanner with that instance of (Doc)Tree.
To scan an instance of (Doc)Tree, the "scan" method is called on the instance of (Doc)TreeScanner with that instance of (Doc)Tree.