1 /* This file was generated by SableCC (http://www.sablecc.org/). */
\r
3 package org.simantics.basicexpression.node;
\r
5 import org.simantics.basicexpression.analysis.*;
\r
7 @SuppressWarnings("nls")
\r
8 public final class AUnaryplusUnary extends PUnary
\r
10 private TPlus _plus_;
\r
11 private PUnary _unary_;
\r
13 public AUnaryplusUnary()
\r
18 public AUnaryplusUnary(
\r
19 @SuppressWarnings("hiding") TPlus _plus_,
\r
20 @SuppressWarnings("hiding") PUnary _unary_)
\r
30 public Object clone()
\r
32 return new AUnaryplusUnary(
\r
33 cloneNode(this._plus_),
\r
34 cloneNode(this._unary_));
\r
37 public void apply(Switch sw)
\r
39 ((Analysis) sw).caseAUnaryplusUnary(this);
\r
42 public TPlus getPlus()
\r
47 public void setPlus(TPlus node)
\r
49 if(this._plus_ != null)
\r
51 this._plus_.parent(null);
\r
56 if(node.parent() != null)
\r
58 node.parent().removeChild(node);
\r
67 public PUnary getUnary()
\r
69 return this._unary_;
\r
72 public void setUnary(PUnary node)
\r
74 if(this._unary_ != null)
\r
76 this._unary_.parent(null);
\r
81 if(node.parent() != null)
\r
83 node.parent().removeChild(node);
\r
89 this._unary_ = node;
\r
93 public String toString()
\r
96 + toString(this._plus_)
\r
97 + toString(this._unary_);
\r
101 void removeChild(@SuppressWarnings("unused") Node child)
\r
104 if(this._plus_ == child)
\r
106 this._plus_ = null;
\r
110 if(this._unary_ == child)
\r
112 this._unary_ = null;
\r
116 throw new RuntimeException("Not a child.");
\r
120 void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
\r
123 if(this._plus_ == oldChild)
\r
125 setPlus((TPlus) newChild);
\r
129 if(this._unary_ == oldChild)
\r
131 setUnary((PUnary) newChild);
\r
135 throw new RuntimeException("Not a child.");
\r