1 /* This file was generated by SableCC (http://www.sablecc.org/). */
3 package org.simantics.basicexpression.node;
5 import org.simantics.basicexpression.analysis.*;
7 @SuppressWarnings("nls")
8 public final class Start extends Node
10 private PExpression _pExpression_;
19 @SuppressWarnings("hiding") PExpression _pExpression_,
20 @SuppressWarnings("hiding") EOF _eof_)
22 setPExpression(_pExpression_);
30 cloneNode(this._pExpression_),
31 cloneNode(this._eof_));
34 public void apply(Switch sw)
36 ((Analysis) sw).caseStart(this);
39 public PExpression getPExpression()
41 return this._pExpression_;
44 public void setPExpression(PExpression node)
46 if(this._pExpression_ != null)
48 this._pExpression_.parent(null);
53 if(node.parent() != null)
55 node.parent().removeChild(node);
61 this._pExpression_ = node;
69 public void setEOF(EOF node)
71 if(this._eof_ != null)
73 this._eof_.parent(null);
78 if(node.parent() != null)
80 node.parent().removeChild(node);
90 void removeChild(Node child)
92 if(this._pExpression_ == child)
94 this._pExpression_ = null;
98 if(this._eof_ == child)
104 throw new RuntimeException("Not a child.");
108 void replaceChild(Node oldChild, Node newChild)
110 if(this._pExpression_ == oldChild)
112 setPExpression((PExpression) newChild);
116 if(this._eof_ == oldChild)
118 setEOF((EOF) newChild);
122 throw new RuntimeException("Not a child.");
126 public String toString()
129 toString(this._pExpression_) +
130 toString(this._eof_);