| 1 | /* This file was generated by SableCC (http://www.sablecc.org/). */ |
| 2 | |
| 3 | package uk.co.zonetora.fj.ast.node; |
| 4 | |
| 5 | import java.util.*; |
| 6 | import uk.co.zonetora.fj.ast.analysis.*; |
| 7 | |
| 8 | public final class ANonLeftRecTermTerm extends PTerm |
| 9 | { |
| 10 | private PNonLeftRecTerm _nonLeftRecTerm_; |
| 11 | |
| 12 | public ANonLeftRecTermTerm() |
| 13 | { |
| 14 | } |
| 15 | |
| 16 | public ANonLeftRecTermTerm( |
| 17 | PNonLeftRecTerm _nonLeftRecTerm_) |
| 18 | { |
| 19 | setNonLeftRecTerm(_nonLeftRecTerm_); |
| 20 | |
| 21 | } |
| 22 | public Object clone() |
| 23 | { |
| 24 | return new ANonLeftRecTermTerm( |
| 25 | (PNonLeftRecTerm) cloneNode(_nonLeftRecTerm_)); |
| 26 | } |
| 27 | |
| 28 | public void apply(Switch sw) |
| 29 | { |
| 30 | ((Analysis) sw).caseANonLeftRecTermTerm(this); |
| 31 | } |
| 32 | |
| 33 | public PNonLeftRecTerm getNonLeftRecTerm() |
| 34 | { |
| 35 | return _nonLeftRecTerm_; |
| 36 | } |
| 37 | |
| 38 | public void setNonLeftRecTerm(PNonLeftRecTerm node) |
| 39 | { |
| 40 | if(_nonLeftRecTerm_ != null) |
| 41 | { |
| 42 | _nonLeftRecTerm_.parent(null); |
| 43 | } |
| 44 | |
| 45 | if(node != null) |
| 46 | { |
| 47 | if(node.parent() != null) |
| 48 | { |
| 49 | node.parent().removeChild(node); |
| 50 | } |
| 51 | |
| 52 | node.parent(this); |
| 53 | } |
| 54 | |
| 55 | _nonLeftRecTerm_ = node; |
| 56 | } |
| 57 | |
| 58 | public String toString() |
| 59 | { |
| 60 | return "" |
| 61 | + toString(_nonLeftRecTerm_); |
| 62 | } |
| 63 | |
| 64 | void removeChild(Node child) |
| 65 | { |
| 66 | if(_nonLeftRecTerm_ == child) |
| 67 | { |
| 68 | _nonLeftRecTerm_ = null; |
| 69 | return; |
| 70 | } |
| 71 | |
| 72 | } |
| 73 | |
| 74 | void replaceChild(Node oldChild, Node newChild) |
| 75 | { |
| 76 | if(_nonLeftRecTerm_ == oldChild) |
| 77 | { |
| 78 | setNonLeftRecTerm((PNonLeftRecTerm) newChild); |
| 79 | return; |
| 80 | } |
| 81 | |
| 82 | } |
| 83 | } |