
prerna.sablecc2.node.AEmptyroutine Maven / Gradle / Ivy
The newest version!
/* This file was generated by SableCC (http://www.sablecc.org/). */
package prerna.sablecc2.node;
import java.util.*;
import prerna.sablecc2.analysis.*;
@SuppressWarnings("nls")
public final class AEmptyroutine extends PEmptyroutine
{
private final LinkedList _semicolon_ = new LinkedList();
public AEmptyroutine()
{
// Constructor
}
public AEmptyroutine(
@SuppressWarnings("hiding") List> _semicolon_)
{
// Constructor
setSemicolon(_semicolon_);
}
@Override
public Object clone()
{
return new AEmptyroutine(
cloneList(this._semicolon_));
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseAEmptyroutine(this);
}
public LinkedList getSemicolon()
{
return this._semicolon_;
}
public void setSemicolon(List> list)
{
for(TSemicolon e : this._semicolon_)
{
e.parent(null);
}
this._semicolon_.clear();
for(Object obj_e : list)
{
TSemicolon e = (TSemicolon) obj_e;
if(e.parent() != null)
{
e.parent().removeChild(e);
}
e.parent(this);
this._semicolon_.add(e);
}
}
@Override
public String toString()
{
return ""
+ toString(this._semicolon_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._semicolon_.remove(child))
{
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
for(ListIterator i = this._semicolon_.listIterator(); i.hasNext();)
{
if(i.next() == oldChild)
{
if(newChild != null)
{
i.set((TSemicolon) newChild);
newChild.parent(this);
oldChild.parent(null);
return;
}
i.remove();
oldChild.parent(null);
return;
}
}
throw new RuntimeException("Not a child.");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy