code: public List<Node<Scope>> toList() {
          List<Node<Scope>> list = new ArrayList<Node<Scope>>();
          walk(rootElement, list);
          return list;
      }
docs: Returns the Scoperee<Scope> as a List of Node<Scope> objects. Scopehe elements of the
  List are generated from a pre-order traversal of the tree.
  @return a List<Node<Scope>>.