01: /* This file was generated by SableCC (http://www.sablecc.org/). */
02:
03: package org.jmatlab.node;
04:
05: import java.util.*;
06: import org.jmatlab.analysis.*;
07:
08: public final class AColonRangeExpression extends PRangeExpression {
09: private TColon _colon_;
10:
11: public AColonRangeExpression() {
12: }
13:
14: public AColonRangeExpression(TColon _colon_) {
15: setColon(_colon_);
16:
17: }
18:
19: public Object clone() {
20: return new AColonRangeExpression((TColon) cloneNode(_colon_));
21: }
22:
23: public void apply(Switch sw) {
24: ((Analysis) sw).caseAColonRangeExpression(this );
25: }
26:
27: public TColon getColon() {
28: return _colon_;
29: }
30:
31: public void setColon(TColon node) {
32: if (_colon_ != null) {
33: _colon_.parent(null);
34: }
35:
36: if (node != null) {
37: if (node.parent() != null) {
38: node.parent().removeChild(node);
39: }
40:
41: node.parent(this );
42: }
43:
44: _colon_ = node;
45: }
46:
47: public String toString() {
48: return "" + toString(_colon_);
49: }
50:
51: void removeChild(Node child) {
52: if (_colon_ == child) {
53: _colon_ = null;
54: return;
55: }
56:
57: }
58:
59: void replaceChild(Node oldChild, Node newChild) {
60: if (_colon_ == oldChild) {
61: setColon((TColon) newChild);
62: return;
63: }
64:
65: }
66: }
|