/* This file was generated by SableCC (http://www.sablecc.org/). 
 * Then modified.
 */

package ast.node;

import ast.visitor.*;

@SuppressWarnings("nls")
public final class NewExp extends IExp
{
    private String _id_;

    public NewExp(int _line_, int _pos_, String _id_)
    {
        super(_line_, _pos_);
        
        setId(_id_);
    }
    
    @Override
    public int getNumExpChildren() { return 0; }

    @Override
    public Object clone()
    {
        return new NewExp(
                this.getLine(),
                this.getPos(),
                this._id_);
    }

    public void accept(Visitor v)
    {
        v.visitNewExp(this);
    }

    public String getId()
    {
        return this._id_;
    }

    public void setId(String id)
    {
        this._id_ = id;
    }

    @Override
    void removeChild(Node child)
    {
        throw new RuntimeException("Not a child.");
    }

    @Override
    void replaceChild(Node oldChild, Node newChild)
    {
        throw new RuntimeException("Not a child.");
    }
}
