public ArrayList<Tree<T>> toks = new ArrayList<Tree<T>>();
public void invoke(Forest.Body<T> bod, Boolean toss, Integer i) {
if (i==null) {
- addAll(bod.expand(toss, 0, new TreeMaker<T>()));
+ ArrayList<Tree<T>> toks = this.toks;
+ this.toks = new ArrayList<Tree<T>>();
+ //addAll(bod.expand(toss, 0, new TreeMaker<T>()));
+ bod.expand(toss, 0, this);
+ this.toks = toks;
} else {
bod.expand(toss, i, this);
}
public <B,C> void invoke(Invokable<Forest.Body<T>,B,C> ivbc, B b, C c) {
ivbc.invoke(this, b, c);
}
- public Iterator<Body<T>> iterator() { return new SingletonIterator<Body<T>>(this); }
private final Input.Location location;
private final T tag;