/* 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 ACommentCommand extends PCommand { private PPosition _position_; private TComment _comment_; public ACommentCommand() { // Constructor } public ACommentCommand( @SuppressWarnings("hiding") PPosition _position_, @SuppressWarnings("hiding") TComment _comment_) { // Constructor setPosition(_position_); setComment(_comment_); } @Override public Object clone() { return new ACommentCommand( cloneNode(this._position_), cloneNode(this._comment_)); } public void apply(Switch sw) { ((Analysis) sw).caseACommentCommand(this); } public PPosition getPosition() { return this._position_; } public void setPosition(PPosition node) { if(this._position_ != null) { this._position_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._position_ = node; } public TComment getComment() { return this._comment_; } public void setComment(TComment node) { if(this._comment_ != null) { this._comment_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._comment_ = node; } @Override public String toString() { return "" + toString(this._position_) + toString(this._comment_); } @Override void removeChild(@SuppressWarnings("unused") Node child) { // Remove child if(this._position_ == child) { this._position_ = null; return; } if(this._comment_ == child) { this._comment_ = null; return; } throw new RuntimeException("Not a child."); } @Override void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) { // Replace child if(this._position_ == oldChild) { setPosition((PPosition) newChild); return; } if(this._comment_ == oldChild) { setComment((TComment) newChild); return; } throw new RuntimeException("Not a child."); } }