| /* 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 ACsOpenPosition extends PPosition |
| { |
| private TCsOpen _csOpen_; |
| |
| public ACsOpenPosition() |
| { |
| // Constructor |
| } |
| |
| public ACsOpenPosition( |
| @SuppressWarnings("hiding") TCsOpen _csOpen_) |
| { |
| // Constructor |
| setCsOpen(_csOpen_); |
| |
| } |
| |
| @Override |
| public Object clone() |
| { |
| return new ACsOpenPosition( |
| cloneNode(this._csOpen_)); |
| } |
| |
| public void apply(Switch sw) |
| { |
| ((Analysis) sw).caseACsOpenPosition(this); |
| } |
| |
| public TCsOpen getCsOpen() |
| { |
| return this._csOpen_; |
| } |
| |
| public void setCsOpen(TCsOpen node) |
| { |
| if(this._csOpen_ != null) |
| { |
| this._csOpen_.parent(null); |
| } |
| |
| if(node != null) |
| { |
| if(node.parent() != null) |
| { |
| node.parent().removeChild(node); |
| } |
| |
| node.parent(this); |
| } |
| |
| this._csOpen_ = node; |
| } |
| |
| @Override |
| public String toString() |
| { |
| return "" |
| + toString(this._csOpen_); |
| } |
| |
| @Override |
| void removeChild(@SuppressWarnings("unused") Node child) |
| { |
| // Remove child |
| if(this._csOpen_ == child) |
| { |
| this._csOpen_ = null; |
| return; |
| } |
| |
| throw new RuntimeException("Not a child."); |
| } |
| |
| @Override |
| void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) |
| { |
| // Replace child |
| if(this._csOpen_ == oldChild) |
| { |
| setCsOpen((TCsOpen) newChild); |
| return; |
| } |
| |
| throw new RuntimeException("Not a child."); |
| } |
| } |