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 APrimaryUnary extends PUnary
10 private PPrimary _primary_;
12 public APrimaryUnary()
18 @SuppressWarnings("hiding") PPrimary _primary_)
21 setPrimary(_primary_);
28 return new APrimaryUnary(
29 cloneNode(this._primary_));
32 public void apply(Switch sw)
34 ((Analysis) sw).caseAPrimaryUnary(this);
37 public PPrimary getPrimary()
39 return this._primary_;
42 public void setPrimary(PPrimary node)
44 if(this._primary_ != null)
46 this._primary_.parent(null);
51 if(node.parent() != null)
53 node.parent().removeChild(node);
59 this._primary_ = node;
63 public String toString()
66 + toString(this._primary_);
70 void removeChild(@SuppressWarnings("unused") Node child)
73 if(this._primary_ == child)
75 this._primary_ = null;
79 throw new RuntimeException("Not a child.");
83 void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
86 if(this._primary_ == oldChild)
88 setPrimary((PPrimary) newChild);
92 throw new RuntimeException("Not a child.");