blob: 10fd541e5125447cceef08dec96133eaee56fe1f [file] [log] [blame]
/* This file was generated by SableCC (http://www.sablecc.org/). */
package com.google.clearsilver.jsilver.syntax.node;
import com.google.clearsilver.jsilver.syntax.analysis.*;
@SuppressWarnings("nls")
public final class ANegativeExpression extends PExpression
{
private PExpression _expression_;
public ANegativeExpression()
{
// Constructor
}
public ANegativeExpression(
@SuppressWarnings("hiding") PExpression _expression_)
{
// Constructor
setExpression(_expression_);
}
@Override
public Object clone()
{
return new ANegativeExpression(
cloneNode(this._expression_));
}
public void apply(Switch sw)
{
((Analysis) sw).caseANegativeExpression(this);
}
public PExpression getExpression()
{
return this._expression_;
}
public void setExpression(PExpression node)
{
if(this._expression_ != null)
{
this._expression_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._expression_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._expression_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._expression_ == child)
{
this._expression_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._expression_ == oldChild)
{
setExpression((PExpression) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}