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 AUnaryplusUnary extends PUnary
\r
21 private TPlus _plus_;
\r
22 private PUnary _unary_;
\r
24 public AUnaryplusUnary()
\r
29 public AUnaryplusUnary(
\r
30 @SuppressWarnings("hiding") TPlus _plus_,
\r
31 @SuppressWarnings("hiding") PUnary _unary_)
\r
41 public Object clone()
\r
43 return new AUnaryplusUnary(
\r
44 cloneNode(this._plus_),
\r
45 cloneNode(this._unary_));
\r
48 public void apply(Switch sw)
\r
50 ((Analysis) sw).caseAUnaryplusUnary(this);
\r
53 public TPlus getPlus()
\r
58 public void setPlus(TPlus node)
\r
60 if(this._plus_ != null)
\r
62 this._plus_.parent(null);
\r
67 if(node.parent() != null)
\r
69 node.parent().removeChild(node);
\r
78 public PUnary getUnary()
\r
80 return this._unary_;
\r
83 public void setUnary(PUnary node)
\r
85 if(this._unary_ != null)
\r
87 this._unary_.parent(null);
\r
92 if(node.parent() != null)
\r
94 node.parent().removeChild(node);
\r
100 this._unary_ = node;
\r
104 public String toString()
\r
107 + toString(this._plus_)
\r
108 + toString(this._unary_);
\r
112 void removeChild(@SuppressWarnings("unused") Node child)
\r
115 if(this._plus_ == child)
\r
117 this._plus_ = null;
\r
121 if(this._unary_ == child)
\r
123 this._unary_ = null;
\r
127 throw new RuntimeException("Not a child.");
\r
131 void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
\r
134 if(this._plus_ == oldChild)
\r
136 setPlus((TPlus) newChild);
\r
140 if(this._unary_ == oldChild)
\r
142 setUnary((PUnary) newChild);
\r
146 throw new RuntimeException("Not a child.");
\r