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