/* This file was generated by SableCC (http://www.sablecc.org/). */ package org.uva.student.calinwouter.qlqls.generated.node; import org.uva.student.calinwouter.qlqls.generated.analysis.*; @SuppressWarnings("nls") public final class AFormBegin extends PBegin { private PForm _form_; public AFormBegin() { // Constructor } public AFormBegin( @SuppressWarnings("hiding") PForm _form_) { // Constructor setForm(_form_); } @Override public Object clone() { return new AFormBegin( cloneNode(this._form_)); } @Override public void apply(Switch sw) { ((Analysis) sw).caseAFormBegin(this); } public PForm getForm() { return this._form_; } public void setForm(PForm node) { if(this._form_ != null) { this._form_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._form_ = node; } @Override public String toString() { return "" + toString(this._form_); } @Override void removeChild(@SuppressWarnings("unused") Node child) { // Remove child if(this._form_ == child) { this._form_ = null; return; } throw new RuntimeException("Not a child."); } @Override void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) { // Replace child if(this._form_ == oldChild) { setForm((PForm) newChild); return; } throw new RuntimeException("Not a child."); } }