prerna.sablecc.node.AColopScript 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 AColopScript extends PScript
{
private TMetatag _metatag_;
private PColop _colop_;
private TSemicolon _semicolon_;
public AColopScript()
{
// Constructor
}
public AColopScript(
@SuppressWarnings("hiding") TMetatag _metatag_,
@SuppressWarnings("hiding") PColop _colop_,
@SuppressWarnings("hiding") TSemicolon _semicolon_)
{
// Constructor
setMetatag(_metatag_);
setColop(_colop_);
setSemicolon(_semicolon_);
}
@Override
public Object clone()
{
return new AColopScript(
cloneNode(this._metatag_),
cloneNode(this._colop_),
cloneNode(this._semicolon_));
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseAColopScript(this);
}
public TMetatag getMetatag()
{
return this._metatag_;
}
public void setMetatag(TMetatag node)
{
if(this._metatag_ != null)
{
this._metatag_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._metatag_ = node;
}
public PColop getColop()
{
return this._colop_;
}
public void setColop(PColop node)
{
if(this._colop_ != null)
{
this._colop_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._colop_ = 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._metatag_)
+ toString(this._colop_)
+ toString(this._semicolon_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._metatag_ == child)
{
this._metatag_ = null;
return;
}
if(this._colop_ == child)
{
this._colop_ = 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._metatag_ == oldChild)
{
setMetatag((TMetatag) newChild);
return;
}
if(this._colop_ == oldChild)
{
setColop((PColop) newChild);
return;
}
if(this._semicolon_ == oldChild)
{
setSemicolon((TSemicolon) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}