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