/* This file was generated by SableCC (http://www.sablecc.org/). */
package org.sablecc.sablecc.node;
import org.sablecc.sablecc.analysis.*;
@SuppressWarnings("nls")
public final class AHexChar extends PChar {
private THexChar _hexChar_;
public AHexChar() {
// Constructor
}
public AHexChar(
@SuppressWarnings("hiding") THexChar _hexChar_) {
// Constructor
setHexChar(_hexChar_);
}
@Override
public Object clone() {
return new AHexChar(
cloneNode(this._hexChar_));
}
@Override
public void apply(Switch sw) {
((Analysis) sw).caseAHexChar(this);
}
public THexChar getHexChar() {
return this._hexChar_;
}
public void setHexChar(THexChar node) {
if (this._hexChar_ != null) {
this._hexChar_.parent(null);
}
if (node != null) {
if (node.parent() != null) {
node.parent().removeChild(node);
}
node.parent(this);
}
this._hexChar_ = node;
}
@Override
public String toString() {
return ""
+ toString(this._hexChar_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child) {
// Remove child
if (this._hexChar_ == child) {
this._hexChar_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) {
// Replace child
if (this._hexChar_ == oldChild) {
setHexChar((THexChar) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}