prerna.sablecc.node.AExprInputOrExpr Maven / Gradle / Ivy
/* This file was generated by SableCC (http://www.sablecc.org/). */
package prerna.sablecc.node;
import prerna.sablecc.analysis.*;
@SuppressWarnings("nls")
public final class AExprInputOrExpr extends PInputOrExpr
{
private PExpr _expr_;
public AExprInputOrExpr()
{
// Constructor
}
public AExprInputOrExpr(
@SuppressWarnings("hiding") PExpr _expr_)
{
// Constructor
setExpr(_expr_);
}
@Override
public Object clone()
{
return new AExprInputOrExpr(
cloneNode(this._expr_));
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseAExprInputOrExpr(this);
}
public PExpr getExpr()
{
return this._expr_;
}
public void setExpr(PExpr node)
{
if(this._expr_ != null)
{
this._expr_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._expr_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._expr_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._expr_ == child)
{
this._expr_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._expr_ == oldChild)
{
setExpr((PExpr) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}