1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 /* This file was generated by SableCC (http://www.sablecc.org/). */
\r
14 package org.simantics.spreadsheet.common.expression.node;
\r
16 import org.simantics.spreadsheet.common.expression.analysis.*;
\r
18 @SuppressWarnings("nls")
\r
19 public final class ASequenceArgList extends PArgList
\r
21 private PArgList _argList_;
\r
22 private TComma _comma_;
\r
23 private PExpression _expression_;
\r
25 public ASequenceArgList()
\r
30 public ASequenceArgList(
\r
31 @SuppressWarnings("hiding") PArgList _argList_,
\r
32 @SuppressWarnings("hiding") TComma _comma_,
\r
33 @SuppressWarnings("hiding") PExpression _expression_)
\r
36 setArgList(_argList_);
\r
40 setExpression(_expression_);
\r
45 public Object clone()
\r
47 return new ASequenceArgList(
\r
48 cloneNode(this._argList_),
\r
49 cloneNode(this._comma_),
\r
50 cloneNode(this._expression_));
\r
53 public void apply(Switch sw)
\r
55 ((Analysis) sw).caseASequenceArgList(this);
\r
58 public PArgList getArgList()
\r
60 return this._argList_;
\r
63 public void setArgList(PArgList node)
\r
65 if(this._argList_ != null)
\r
67 this._argList_.parent(null);
\r
72 if(node.parent() != null)
\r
74 node.parent().removeChild(node);
\r
80 this._argList_ = node;
\r
83 public TComma getComma()
\r
85 return this._comma_;
\r
88 public void setComma(TComma node)
\r
90 if(this._comma_ != null)
\r
92 this._comma_.parent(null);
\r
97 if(node.parent() != null)
\r
99 node.parent().removeChild(node);
\r
105 this._comma_ = node;
\r
108 public PExpression getExpression()
\r
110 return this._expression_;
\r
113 public void setExpression(PExpression node)
\r
115 if(this._expression_ != null)
\r
117 this._expression_.parent(null);
\r
122 if(node.parent() != null)
\r
124 node.parent().removeChild(node);
\r
130 this._expression_ = node;
\r
134 public String toString()
\r
137 + toString(this._argList_)
\r
138 + toString(this._comma_)
\r
139 + toString(this._expression_);
\r
143 void removeChild(@SuppressWarnings("unused") Node child)
\r
146 if(this._argList_ == child)
\r
148 this._argList_ = null;
\r
152 if(this._comma_ == child)
\r
154 this._comma_ = null;
\r
158 if(this._expression_ == child)
\r
160 this._expression_ = null;
\r
164 throw new RuntimeException("Not a child.");
\r
168 void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
\r
171 if(this._argList_ == oldChild)
\r
173 setArgList((PArgList) newChild);
\r
177 if(this._comma_ == oldChild)
\r
179 setComma((TComma) newChild);
\r
183 if(this._expression_ == oldChild)
\r
185 setExpression((PExpression) newChild);
\r
189 throw new RuntimeException("Not a child.");
\r