
prerna.sablecc2.node.ABaseSubScript 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 ABaseSubScript extends PBaseSubScript
{
private PMandatoryScriptchain _mandatoryScriptchain_;
private TSemicolon _semicolon_;
public ABaseSubScript()
{
// Constructor
}
public ABaseSubScript(
@SuppressWarnings("hiding") PMandatoryScriptchain _mandatoryScriptchain_,
@SuppressWarnings("hiding") TSemicolon _semicolon_)
{
// Constructor
setMandatoryScriptchain(_mandatoryScriptchain_);
setSemicolon(_semicolon_);
}
@Override
public Object clone()
{
return new ABaseSubScript(
cloneNode(this._mandatoryScriptchain_),
cloneNode(this._semicolon_));
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseABaseSubScript(this);
}
public PMandatoryScriptchain getMandatoryScriptchain()
{
return this._mandatoryScriptchain_;
}
public void setMandatoryScriptchain(PMandatoryScriptchain node)
{
if(this._mandatoryScriptchain_ != null)
{
this._mandatoryScriptchain_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._mandatoryScriptchain_ = node;
}
public TSemicolon getSemicolon()
{
return this._semicolon_;
}
public void setSemicolon(TSemicolon node)
{
if(this._semicolon_ != null)
{
this._semicolon_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._semicolon_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._mandatoryScriptchain_)
+ toString(this._semicolon_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._mandatoryScriptchain_ == child)
{
this._mandatoryScriptchain_ = null;
return;
}
if(this._semicolon_ == child)
{
this._semicolon_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._mandatoryScriptchain_ == oldChild)
{
setMandatoryScriptchain((PMandatoryScriptchain) newChild);
return;
}
if(this._semicolon_ == oldChild)
{
setSemicolon((TSemicolon) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy