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