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