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 ASequenceArgList extends PArgList
10 private PArgList _argList_;
11 private TComma _comma_;
12 private PExpression _expression_;
14 public ASequenceArgList()
19 public ASequenceArgList(
20 @SuppressWarnings("hiding") PArgList _argList_,
21 @SuppressWarnings("hiding") TComma _comma_,
22 @SuppressWarnings("hiding") PExpression _expression_)
25 setArgList(_argList_);
29 setExpression(_expression_);
36 return new ASequenceArgList(
37 cloneNode(this._argList_),
38 cloneNode(this._comma_),
39 cloneNode(this._expression_));
42 public void apply(Switch sw)
44 ((Analysis) sw).caseASequenceArgList(this);
47 public PArgList getArgList()
49 return this._argList_;
52 public void setArgList(PArgList node)
54 if(this._argList_ != null)
56 this._argList_.parent(null);
61 if(node.parent() != null)
63 node.parent().removeChild(node);
69 this._argList_ = node;
72 public TComma getComma()
77 public void setComma(TComma node)
79 if(this._comma_ != null)
81 this._comma_.parent(null);
86 if(node.parent() != null)
88 node.parent().removeChild(node);
97 public PExpression getExpression()
99 return this._expression_;
102 public void setExpression(PExpression node)
104 if(this._expression_ != null)
106 this._expression_.parent(null);
111 if(node.parent() != null)
113 node.parent().removeChild(node);
119 this._expression_ = node;
123 public String toString()
126 + toString(this._argList_)
127 + toString(this._comma_)
128 + toString(this._expression_);
132 void removeChild(@SuppressWarnings("unused") Node child)
135 if(this._argList_ == child)
137 this._argList_ = null;
141 if(this._comma_ == child)
147 if(this._expression_ == child)
149 this._expression_ = null;
153 throw new RuntimeException("Not a child.");
157 void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
160 if(this._argList_ == oldChild)
162 setArgList((PArgList) newChild);
166 if(this._comma_ == oldChild)
168 setComma((TComma) newChild);
172 if(this._expression_ == oldChild)
174 setExpression((PExpression) newChild);
178 throw new RuntimeException("Not a child.");