
prerna.sablecc2.node.AOtherscript Maven / Gradle / Ivy
The newest version!
/* This file was generated by SableCC (http://www.sablecc.org/). */
package prerna.sablecc2.node;
import prerna.sablecc2.analysis.*;
@SuppressWarnings("nls")
public final class AOtherscript extends POtherscript
{
private TCustom _custom_;
private PMasterExpr _masterExpr_;
public AOtherscript()
{
// Constructor
}
public AOtherscript(
@SuppressWarnings("hiding") TCustom _custom_,
@SuppressWarnings("hiding") PMasterExpr _masterExpr_)
{
// Constructor
setCustom(_custom_);
setMasterExpr(_masterExpr_);
}
@Override
public Object clone()
{
return new AOtherscript(
cloneNode(this._custom_),
cloneNode(this._masterExpr_));
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseAOtherscript(this);
}
public TCustom getCustom()
{
return this._custom_;
}
public void setCustom(TCustom node)
{
if(this._custom_ != null)
{
this._custom_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._custom_ = node;
}
public PMasterExpr getMasterExpr()
{
return this._masterExpr_;
}
public void setMasterExpr(PMasterExpr node)
{
if(this._masterExpr_ != null)
{
this._masterExpr_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._masterExpr_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._custom_)
+ toString(this._masterExpr_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._custom_ == child)
{
this._custom_ = null;
return;
}
if(this._masterExpr_ == child)
{
this._masterExpr_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._custom_ == oldChild)
{
setCustom((TCustom) newChild);
return;
}
if(this._masterExpr_ == oldChild)
{
setMasterExpr((PMasterExpr) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy