package polyglot.ext.jl5.ast;

import polyglot.ast.Ext;
import polyglot.ast.Ext_c;
import polyglot.ast.JL;
import polyglot.ast.Node;
import polyglot.util.InternalCompilerError;
import polyglot.util.SerialVersionUID;

public class JL5Ext extends Ext_c {
    private static final long serialVersionUID = SerialVersionUID.generate();

    /**
     * The delegate object to invoke "superclass" functionality.
     * If null, this superclass functionality will by default be delegated
     * to the node. However, extensions to JL5 can override this if needed.
     */
    protected JL superDel = null;

    public static JL5Ext ext(Node n) {
        Ext e = n.ext();
        while (e != null && !(e instanceof JL5Ext)) {
            e = e.ext();
        }
        if (e == null) {
            throw new InternalCompilerError("No JL5 extension object for node "
                    + n + " (" + n.getClass() + ")", n.position());
        }
        return (JL5Ext) e;
    }

    public JL superDel() {
        if (this.superDel == null) {
            return this.node();
        }
        return this.superDel;
    }

    public void setSuperDel(JL superDel) {
        this.superDel = superDel;
    }
}

@@ -954,32 +954,394 @@
 5Ext) e;%0A    %7D%0A%0A
+    @Override%0A    public void init(Node node) %7B%0A        super.init(node);%0A        if (superDel != null) %7B%0A            superDel.init(node);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public Object copy() %7B%0A        JL5Ext copy = (JL5Ext) super.copy();%0A        if (superDel != null) %7B%0A            copy.superDel = (JL) superDel.copy();%0A        %7D%0A        return copy;%0A    %7D%0A%0A
     public JL su

Add init and copy for JL5Ext.