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 AAddressValue extends PValue
\r
10 private TAmpersand _ampersand_;
\r
11 private PRange _range_;
\r
13 public AAddressValue()
\r
18 public AAddressValue(
\r
19 @SuppressWarnings("hiding") TAmpersand _ampersand_,
\r
20 @SuppressWarnings("hiding") PRange _range_)
\r
23 setAmpersand(_ampersand_);
\r
30 public Object clone()
\r
32 return new AAddressValue(
\r
33 cloneNode(this._ampersand_),
\r
34 cloneNode(this._range_));
\r
37 public void apply(Switch sw)
\r
39 ((Analysis) sw).caseAAddressValue(this);
\r
42 public TAmpersand getAmpersand()
\r
44 return this._ampersand_;
\r
47 public void setAmpersand(TAmpersand node)
\r
49 if(this._ampersand_ != null)
\r
51 this._ampersand_.parent(null);
\r
56 if(node.parent() != null)
\r
58 node.parent().removeChild(node);
\r
64 this._ampersand_ = node;
\r
67 public PRange getRange()
\r
69 return this._range_;
\r
72 public void setRange(PRange node)
\r
74 if(this._range_ != null)
\r
76 this._range_.parent(null);
\r
81 if(node.parent() != null)
\r
83 node.parent().removeChild(node);
\r
89 this._range_ = node;
\r
93 public String toString()
\r
96 + toString(this._ampersand_)
\r
97 + toString(this._range_);
\r
101 void removeChild(@SuppressWarnings("unused") Node child)
\r
104 if(this._ampersand_ == child)
\r
106 this._ampersand_ = null;
\r
110 if(this._range_ == child)
\r
112 this._range_ = 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._ampersand_ == oldChild)
\r
125 setAmpersand((TAmpersand) newChild);
\r
129 if(this._range_ == oldChild)
\r
131 setRange((PRange) newChild);
\r
135 throw new RuntimeException("Not a child.");
\r