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 AMultiRange extends PRange
11 private TColon _colon_;
12 private TCell _right_;
20 @SuppressWarnings("hiding") TCell _left_,
21 @SuppressWarnings("hiding") TColon _colon_,
22 @SuppressWarnings("hiding") TCell _right_)
36 return new AMultiRange(
37 cloneNode(this._left_),
38 cloneNode(this._colon_),
39 cloneNode(this._right_));
42 public void apply(Switch sw)
44 ((Analysis) sw).caseAMultiRange(this);
47 public TCell getLeft()
52 public void setLeft(TCell node)
54 if(this._left_ != null)
56 this._left_.parent(null);
61 if(node.parent() != null)
63 node.parent().removeChild(node);
72 public TColon getColon()
77 public void setColon(TColon node)
79 if(this._colon_ != null)
81 this._colon_.parent(null);
86 if(node.parent() != null)
88 node.parent().removeChild(node);
97 public TCell getRight()
102 public void setRight(TCell node)
104 if(this._right_ != null)
106 this._right_.parent(null);
111 if(node.parent() != null)
113 node.parent().removeChild(node);
123 public String toString()
126 + toString(this._left_)
127 + toString(this._colon_)
128 + toString(this._right_);
132 void removeChild(@SuppressWarnings("unused") Node child)
135 if(this._left_ == child)
141 if(this._colon_ == child)
147 if(this._right_ == child)
153 throw new RuntimeException("Not a child.");
157 void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
160 if(this._left_ == oldChild)
162 setLeft((TCell) newChild);
166 if(this._colon_ == oldChild)
168 setColon((TColon) newChild);
172 if(this._right_ == oldChild)
174 setRight((TCell) newChild);
178 throw new RuntimeException("Not a child.");